in reply to generating variable names

Dynamically generate the code and eval() it. For example: for $i (0..10) { my $code = "\$blah" . $i; print eval($code); } But, of course btrott is right. You might want to think about using arrays or hashes.