for (1..110) { ......//Only when this loops ends you are assigning zmax } $ZMAX = max @column8; print "maxZ $ZMAX\n"; $ZMIN = min @column8; print "minZ $ZMIN\n"; $thick = $ZMAX - $ZMIN;
The OPed code actually assigns $ZMAX etc. within the body of the for-loop.
In reply to Re^2: how to make variable forget its previous value?
by AnomalousMonk
in thread how to make variable forget its previous value?
by sagar123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |