Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Substituting Variables while reading text file

by toolic (Bishop)
on Aug 05, 2014 at 18:04 UTC ( #1096331=note: print w/replies, xml ) Need Help??


in reply to Substituting Variables while reading text file

s///
use warnings; use strict; my $VAR = 'TEMP_VAR'; while (<DATA>) { s/\$VAR\b/$VAR/g; print; } __DATA__ create variable $VAR alarm_object 0

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-09-27 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?