Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: export variable outside foreach

by Eily (Priest)
on Jun 19, 2014 at 08:38 UTC ( #1090421=note: print w/ replies, xml ) Need Help??


in reply to export variable outside foreach

What do you mean by "it doesn't work" ? Does it print something wrong, or nothing at all? See How do I post a question effectively?

Since you have replaced your values and have not given any sample data, I can't tell if this is on purpose but in /\Q$string1/ $string1 is interpreted as a literal string, not a regular expression. This means for example that "a*" will match "a*b+c" and not "aaaaaaa". To have your string interpreted as a regex, do not use \Q

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2016-06-27 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (334 votes). Check out past polls.