Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Ending a 'next unless' loop...

by blueberryCoffee (Scribe)
on Oct 04, 2006 at 05:39 UTC ( [id://576262]=note: print w/replies, xml ) Need Help??


in reply to Ending a 'next unless' loop...

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");

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://576262]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-25 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found