Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: parse hash to sub

by jsprat (Curate)
on Jul 15, 2003 at 17:25 UTC ( #274483=note: print w/ replies, xml ) Need Help??


in reply to parse hash to sub

Parameters to a sub are flattened into a single list. More information can be found at perlsub.

In reference to your question, either pass a reference or shift off the first item, then assign to your hash - ie:

my $count = shift; %packages = @_;

HTH...


Comment on Re: parse hash to sub
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-04-19 15:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (482 votes), past polls