sub query { my $search = shift; while(my $line = <EMPLOYEES>) { if($line =~ /(.*?)\t(.*?)\t.*$search/) { return "$1 speaks $search and lives in $2"; } } return "Sorry, nothin for ya"; } print query("Norse");
In reply to Re: Ending a 'next unless' loop...
by blueberryCoffee
in thread Ending a 'next unless' loop...
by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |