Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: export variable outside foreach

by Eily (Prior)
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?
Tanktalus is looking for any blogs or other sources of info on creating a "partial" cache - an incomplete cache that can tell the difference between data being present and known, data being absent and known, and data being unknown (we haven't looked for it
[Tanktalus]: yet, so it may or may not exist) in a reasonably fast and memory-efficient manner.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2018-08-16 19:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (171 votes). Check out past polls.

    Notices?