Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: a HASH ref while "strict refs" ERROR

by Paladin (Priest)
on May 04, 2005 at 17:39 UTC ( #454068=note: print w/replies, xml ) Need Help??


in reply to a HASH ref while "strict refs" ERROR

Another way to fix the problem if you do really want to use prototypes is to declare them before you use them (although I do agree with ikegami that it is probably better not to use them in the first place):

use strict; sub higherLevel(\@); sub showArray(\@); sub higherLevel(\@) { my(@arr) = @{(shift)}; showArray(@arr); } sub showArray(\@) { my(@arr) = @{(shift)}; my($temp); foreach $temp (@arr) { print "$temp\n"; } } my(@arr) = ("one","two","three"); higherLevel(@arr);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://454068]
help
Chatterbox?
Discipulus yaaawn..
[Corion]: DST does that to everybody...
Corion attempts to find who to address to better target his drive-by patches
[Corion]: This time it's for the Duktape embedded Javascript engine, which would be nice to have IMO, but doesn't compile on Windows currently
[Corion]: I imagine it would be fun to have WWW::Mechanize:: Duktape, but I haven't seen a web browser written in Javascript yet, except the ones distributed with PhantomJs

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-03-27 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (319 votes). Check out past polls.