Possible? Yes. Advisable? No. Perl has arrays which would be ideal for this instead. eg.
my $ecounter = 0; my @e = (); my @file_line_contents = split (/\|/,$_); while ($ecounter < 45) { # Note brackets, not quotation marks! $e[$ecounter] = length($file_line_contents[$ecounter]); $ecounter++; }
But there are probably more perlish ways to achieve the same result and which would be more fault-tolerant into the bargain.
In reply to Re: Using a variable to define a variable
by hippo
in thread Using a variable to define a variable
by insta.gator
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |