Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: no grep match returns undefined?

by Aristotle (Chancellor)
on Sep 06, 2002 at 04:59 UTC ( [id://195571]=note: print w/replies, xml ) Need Help??


in reply to Re: no grep match returns undefined?
in thread no grep match returns undefined?

You can get rid of both temporary variables that way too. Step 1:
my $re = join '|', keys %vendors; if($args->{desc} =~ /$re/) { ... } else { ... }
Step 2: if($args->{desc} =~ /@{[join '|', keys %vendors]}/) { ... } else { ... } Depending on your Perl prowess you may or may not find step 2 readable.

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found