Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: difference between @, $

by johngg (Abbot)
on Dec 07, 2011 at 18:12 UTC ( #942300=note: print w/ replies, xml ) Need Help??


in reply to Re: difference between @, $
in thread difference between @, $

It can also be useful to name the variables using Dump() or Dumpxs() (see Data::Dumper) to avoid confusion.

knoppix@Microknoppix:~$ perl -MData::Dumper -E ' > @arr1 = ( 1 .. 4 ); > @arr2 = [ 1 .. 4 ]; > $arr3 = [ 1 .. 4 ]; > print Data::Dumper->Dumpxs( > [ \ @arr1, \ @arr2, $arr3 ], > [ qw{ *arr1 *arr2 arr3 } ], > );' @arr1 = ( 1, 2, 3, 4 ); @arr2 = ( [ 1, 2, 3, 4 ] ); $arr3 = [ 1, 2, 3, 4 ]; knoppix@Microknoppix:~$

I hope this is of interest.

Cheers,

JohnGG


Comment on Re^2: difference between @, $
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2015-07-06 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls