ftforger has asked for the wisdom of the Perl Monks concerning the following question:
I have a script something like this (I know this doesn't work, this is just a rough sample)
$v1="user_value1"; open(INFILE,"<template.file"); $input=<INFILE>; eval $input; $line = "$input"; close(INFILE); print "$line\n";
with the contents of "template.file" being
thing1 type1 $v1
What I want is when the script runs, the print would produce:
thing1 type1 user_value1
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: "eval" variable in non-perl statment?
by stephen (Priest) on Mar 29, 2001 at 00:30 UTC | |
by ftforger (Sexton) on Mar 29, 2001 at 00:41 UTC | |
Re: "eval" variable in non-perl statment?
by athomason (Curate) on Mar 29, 2001 at 00:38 UTC | |
by ftforger (Sexton) on Mar 29, 2001 at 00:50 UTC | |
Re: "eval" variable in non-perl statment?
by mr.nick (Chaplain) on Mar 29, 2001 at 00:35 UTC | |
Re: "eval" variable in non-perl statment?
by c-era (Curate) on Mar 29, 2001 at 00:32 UTC |
Back to
Seekers of Perl Wisdom