#use strict; #use warnings; my $counter = 0; while (<DATA>) { eval "\$a" . $counter++ . " = '$_';"; } print "$a0 $a1 $a2"; __DATA__ line 1 line 2 line 3
rdfield
In reply to Re: dynamically created variables
by rdfield
in thread dynamically created variables
by ahakim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |