"my( $scalar ) = EXPR" is list context (you should definetly read "List" is a Four-Letter Word).$_ = 'in scalar context' x 3; print $_,$/; while(/in scalar context/g){ print $a++,$/; }
Try my $foo = () = /in scalar context/g; You should get 3.
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | |
| I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | |
| ** The third rule of perl club is a statement of fact: pod is sexy. |
In reply to Re: Zipcode Regex Help
by PodMaster
in thread Zipcode Regex Help
by tcf22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |