Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Substituting Variables while reading text file

by frozenwithjoy (Priest)
on Aug 05, 2014 at 18:05 UTC ( [id://1096332]=note: print w/replies, xml ) Need Help??


in reply to Substituting Variables while reading text file

Edit: Oops, toolic beat me to the punch!

What about something like this:
#!/usr/bin/env perl use strict; use warnings; my $VAR = "TEMP_VAR"; while (<DATA>) { s/\$VAR/$VAR/; 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://1096332]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found