Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 pondering the Monastery: (14)
As of 2015-07-06 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls