http://qs321.pair.com?node_id=1096332


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