in reply to Re^2: More intelligent warning?
in thread More intelligent warning?
Nope! I can not see any rational for that.
Hmm, well. $_ is the default "this", so @_ is the default "these". If split is called implicitly on $_, it seems somewhat logical to me to implicitly split into @_.
Bu then, the following arguably should not implicitly split into @_ :
perl -wle '$n="";$f="abc";$n=split//,$f;print for @_'
To defeat that behavior we have to use the "operator" with the disputed name...
perl -wle '$n=""; $f="abc"; $n=()=split//,$f; print for @_'
update:
That looks like coming from looong ago. Consider:
So... another reminiscence of perl4. perl4!while(<>) { $n = split; warn "processing $n tokens\n"; &process; # implicitly takes @_ }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: More intelligent warning?
by BrowserUk (Patriarch) on Feb 08, 2010 at 01:26 UTC |