in reply to Re: Putting Hash values into an array
in thread Putting Hash values into an array
Hello Athanasius,
perl -E 'use strict; foreach (my $RID) { say "okay"; }' --------------------------------- Output: 'okay'
I changed the 'foreach' to 'while' and it didn't enter the loop. Some monk more familiar with the internals of Perl, will have to clarify. I'm guessing that 'while' tests at the beginning of the loop, and 'foreach' tests at the end of the loop. But that is just a guess.
I did the test to see if 'use strict;' would pick up the error. But if didn't and the script worked, so I kept my mouth shut and looked for someone to give a better answer, which you did(++).
Regards...Ed
"Well done is better than well said." - Benjamin Franklin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Putting Hash values into an array
by Athanasius (Archbishop) on Feb 28, 2014 at 08:52 UTC |