in reply to Printing Variable Variables
Common Beginner Mistakes has a good explanation of why you almost never want to use symbolic refs.use strict; my $string0 = "Jessy"; my $string1 = "Bob"; my $string2 = "Nancy"; for my $num (0..3) { no strict 'refs'; # Thanks for the correction, tinita print "${qq(string$num)}\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Printing Variable Variables
by tinita (Parson) on Sep 13, 2005 at 19:29 UTC |