On 05/12/2007 07:00 PM, Rob Dixon wrote:
[...]
No, it has no effect on $1. I thought it would cause confusion! The statement simply assigns a list to @f. The first element of the list is undef, and the rest is the
result of applying the regex to $email, so it's the same as

 my @f = (undef);
 push @f, $email =~ /(.*)\@(.*)/;

and simply offsets the captured results by one. As I said, I can see no reason to have written it this way unless Mumia wanted $f[1] to correspond to $1 and $f[2] to $2.
[...]

That was exactly my intention.

I thought I had to choose between that and setting $[ . Which is worse? ;-)

Anyway, I now think that a couple of scalars would have been better.





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to