in reply to unsure how to use variable
I'm sure I'm missing something simpleYes... use strict and warnings. You can not construct a variable that way. You should use an array instead of individual scalar variables:
See also:use warnings; use strict; my @holdings = qw( green blue yellow ); for (my $count = 2 ; $count >= 0 ; $count-- ) { my $tempvar = $holdings[$count]; print "$tempvar<br>"; } print "\n"; __END__ yellow<br>blue<br>green<br>
|
|---|