|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re^4: how to pull in all params that are numberedby imp (Priest) |
| on Jun 18, 2007 at 18:46 UTC ( #621855=note: print w/ replies, xml ) | Need Help?? |
|
The problem is that while does not iterate over a list, it simply checks for a true value. For example, while (1){} will run forever, whereas for (1){} will run once. The same behaviour occurs when test being evaluated is param(). Additionally, while (param()){} will not modify $_. Perhaps you tested the script without any arguments, in which case it would have behaved as expected. Here is a simple test: You can verify it by adding the parameters on the commandline, e.g.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||