A few points unrelated to your immediate problem:
Minor variations on the line:
$var = pop (@stack1) + pop (@stack1);
will surprise you one day. It is not defined in what order the pops are executed. If the operator were / or . then the result may be quite different than you expected! The same issue occurs in the evaluation order of parameter lists and can cause very subtle bugs.
In reply to Re: using foreach
by GrandFather
in thread using foreach
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |