Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
laziness, impatience, and hubris
 
PerlMonks  

Re: Creating 'new' subroutine.

by jwkrahn (Monsignor)
on Oct 11, 2013 at 06:30 UTC ( #1057832=note: print w/ replies, xml ) Need Help??


in reply to Creating 'new' subroutine.

Assign a hash reference to $options and if @_ contains any elements then copy those to the hash.


Comment on Re: Creating 'new' subroutine.
Re^2: Creating 'new' subroutine.
by nitin.sh1982 (Initiate) on Oct 17, 2013 at 04:21 UTC
    Thanks. It makes sense. But, what does the 'scalar' do in that case then?

      In that case it is superfluous as @_ is already in scalar context.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2014-04-18 17:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (471 votes), past polls