* Abigail <abigail@abigail.be> [2008-07-29 12:45]:
> On Tue, Jul 29, 2008 at 11:05:27AM +0100, Nicholas Clark wrote:
> > By which you mean remove the assignment to @_, and the
> > warning, but keep the behaviour demonstrated above working?
>
> That would be quite useful, IMO, as the following secret
> operator doesn't work for split:
>
> $words +=()= split;
>
> It's one of the few places where perl incorrectly outsmarts the
> programmer.
Do note that you can still beat perl at its own game:
$words += map 1, split;
--
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}
&Just->another->Perl->hack;
#Aristotle Pagaltzis // <http://plasmasturm.org/>
Thread Previous
|
Thread Next