Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: how to read perl variable from a line read from a file

by Anonymous Monk
on Jan 31, 2013 at 16:39 UTC ( #1016356=note: print w/ replies, xml ) Need Help??


in reply to Re^2: how to read perl variable from a line read from a file
in thread how to read perl variable from a line read from a file

It's not perfect. It's missing a close $fh and the substitution regexp probably should be s/\$([a-z]+)/ $vars{$1} || "\$$1" /gie; to give a somewhat sane behaviour for undefined variables (instead of substituting them with the empty string. Which is what *nix shells do, so I guess it's not that bad...)


Comment on Re^3: how to read perl variable from a line read from a file
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-12-29 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (188 votes), past polls