« Perlbal À¥¼¹ö | Main | Mini Flv Player »
April 03, 2007
»÷µåÀ§Ä¡ ÁÖ¹®À» À§ÇÑ ÆÞ(Perl) ÄÚµå
use strict;
my $fail;
sub order_sandwich {
local $_ = shift;
/^How are you/
and return "I'm good.";
/^What .* order/
and return "Chicken Breast Sandwich.";
/^What kind of bread/
and return "French Roll.";
/^(Put )?everything\?/i
and return "Yes.";
/cheese/
and return "Cheddar Cheese.";
if ($fail++ <= 3) {
return "Sorry?";
}
return "Whatever.";
}
From blog.bulknews.net
Posted by kiseok7 at April 3, 2007 09:45 PM