Do you mean replace a for loop with a foreach loop, or vice versa? Certainly! They have different semantics!
The keyword "for" is the same as the keyword "foreach". The "for" loop is different from the "foreach" loop. Do I need to keep repeating this? {sigh}
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re^6: Interview Prepration
by merlyn
in thread Interview Prepration
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |