Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: why does push not default to $_?

by mr_mischief (Monsignor)
on Dec 08, 2008 at 21:49 UTC ( [id://729042]=note: print w/replies, xml ) Need Help??


in reply to why does push not default to $_?

My first guess would be that push is paired with pop. You might very well want to say, for example, pop @foo; without putting what was popped anywhere. If push() took $_ by default, one might expect pop() to assign to $_ by default. Logical pairs that don't both deal with the same implicit variable should probably neither one do so.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-19 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found