dru145 has asked for the wisdom of the Perl Monks concerning the following question:
I tried it a few differnt ways, but I'm not having much luck.#!/usr/local/bin/perl -w $cmd1 = 'This'; $cmd2 = 'Is'; $cmd3 = 'a'; $cmd4 = 'test'; my @cmds = ($cmd1..$cmd4); for (@cmds){ print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Specifiying a Range for Variables?
by tachyon (Chancellor) on Nov 27, 2002 at 17:19 UTC | |
|
Re: Specifiying a Range for Variables?
by joealba (Hermit) on Nov 27, 2002 at 17:20 UTC | |
by Aristotle (Chancellor) on Nov 27, 2002 at 17:36 UTC | |
|
Re: Specifiying a Range for Variables?
by thelenm (Vicar) on Nov 27, 2002 at 17:24 UTC | |
|
Re: Specifiying a Range for Variables?
by Mr. Muskrat (Canon) on Nov 27, 2002 at 17:25 UTC | |
|
Re: Specifiying a Range for Variables?
by dingus (Friar) on Nov 27, 2002 at 17:22 UTC |