Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Autovivification of scalars in sub calls

by Anonymous Monk
on Dec 08, 2005 at 22:01 UTC ( [id://515397]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     
    my $var=3;
    mysleep($var); # these two lines are fine
    ...
               sleep($_[0]);
               $_[0]=10;
    }
    
  2. or download this
    $y=substr("hello",10,1); 
    foo($y);# this runs, but substr() generates warnings because the subst
    +r() is outside the string
    
    foo( substr("hello",10,1) ); # this is a fatal error!
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-19 11:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found