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

Re: Substituting Variables while reading text file

by frozenwithjoy (Priest)
on Aug 05, 2014 at 18:05 UTC ( #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
Node Status?
node history
Node Type: note [id://1096332]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2020-09-27 16:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (142 votes). Check out past polls.

    Notices?