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

Re^2: More Scope related questions.

by curiousmonk (Beadle)
on Mar 29, 2013 at 07:22 UTC ( [id://1026102]=note: print w/replies, xml ) Need Help??


in reply to Re: More Scope related questions.
in thread More Scope related questions.

Thanks, this was one thing I didn't know about. It just all boils down to reading documentation properly

Just as you said

$ perl -e 'use strict;use Data::Dumper;{my @c=(0..10);$d=\@c} print Du +mper $d' Global symbol "$d" requires explicit package name at -e line 1. Global symbol "$d" requires explicit package name at -e line 1.

Doesn't work, but

$ perl -e 'use strict;use Data::Dumper;{my @a=(0..10);$b=\@a} print Du +mper $b' $VAR1 = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];

Does

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found