moked has asked for the wisdom of the Perl Monks concerning the following question:
However, perl ignores all the $variables and print them explicitly. How do I make perl specify the variable value when prining $line?$a=1; $b=2; .... while ($line = <INFILE>) { chomp($line); # contains $a, $b print "$line\n"; #prints "$a" "$b"
Thx,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Making perl evaluate a variable with a string
by jwkrahn (Abbot) on Apr 01, 2007 at 15:34 UTC | |
|
Re: Making perl evaluate a variable with a string
by shmem (Chancellor) on Apr 01, 2007 at 15:35 UTC | |
by moked (Beadle) on Apr 01, 2007 at 15:57 UTC | |
by klekker (Pilgrim) on Apr 01, 2007 at 16:20 UTC | |
|
Re: Making perl evaluate a variable with a string
by Anonymous Monk on Apr 02, 2007 at 02:57 UTC |