in reply to Specifiying a Range for Variables?
This is probably not the best way to do it nor the best thing to do...
#!/usr/bin/perl $cmd1 = 'This'; $cmd2 = 'Is'; $cmd3 = 'a'; $cmd4 = 'test'; my @cmds = (1..4); for (@cmds){ print ${"cmd$_"},$/; } [download]