Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Perl oddities

by ihb (Deacon)
on Mar 01, 2005 at 22:10 UTC ( #435633=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Perl oddities
in thread Perl oddities

You can do

if (my @r = $line =~ /(this).*(that).*(some).*(other)/) { my ($this, $that, $some, $other) = @r; do_it(); }
if you want the conditional expression shorter and don't want to repeat the dollar-digit vars.

ihb

See perltoc if you don't know which perldoc to read!


Comment on Re^4: Perl oddities
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2014-12-25 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls