Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^5: Massive expansion of a hash of arrays?

by farang (Hermit)
on Jul 20, 2014 at 23:32 UTC ( #1094407=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Massive expansion of a hash of arrays?
in thread Massive expansion of a hash of arrays?

A final point, i tried to move the subroutine definition below the code calling it (I like to keep all my subs at the bottom), but i get an error: Can't call method "nForX" without a package or object reference at ./test.pl line 617.
It seems you'll need to add a forward declaration with the prototype in order to move the sub definition below the calling code.

sub nForX(&@); ... nForX { print join ' ', @_; } 3, \( @a, @b, @c ); ... sub nForX(&@) { #use of prototype here is actually irrelevant #now, i.e. sub nForX {...} works the same ... }


Comment on Re^5: Massive expansion of a hash of arrays?
Download Code
Re^6: Massive expansion of a hash of arrays?
by Amblikai (Beadle) on Jul 22, 2014 at 13:45 UTC

    Ok, Thanks!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-09-24 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (246 votes), past polls