Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: \ as a binary operator

by dk (Chaplain)
on Jul 01, 2009 at 23:11 UTC ( [id://776586]=note: print w/replies, xml ) Need Help??


in reply to Re: \ as a binary operator
in thread \ as a binary operator

You're right. Not only that $_[0] is an alias, and the original implementation is redundant because of it, but also that it could be implemented much more concisely, f.ex. sub head($) { $_[0] =~ s/^(\S+)\s+// and $1 }

However, with these changes, the very point of the post would be missed. There was a reason that I put it in "obfuscation" - because "head $msg" is trivial and "head \ $msg" is fun :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://776586]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found