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

Re: Passing variable to if statement

by PeachCityDude (Novice)
on Jul 16, 2014 at 20:26 UTC ( [id://1093937]=note: print w/replies, xml ) Need Help??


in reply to Passing variable to if statement

I removed the "once" modifier and now the code works perfectly. Thank you very much!

Replies are listed 'Best First'.
Re^2: Passing variable to if statement
by Jim (Curate) on Jul 16, 2014 at 23:31 UTC
    I removed the "once" modifier and now the code works perfectly.

    I don't think the code is working perfectly. If any of the names in array.txt have regular expression metacharacters in them, then the regular expression pattern you're using is unlikely to match the text as you expect it to.

    See perldoc -f quotemeta.

Log In?
Username:
Password:

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

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

    No recent polls found