Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: new to perl, syntax question

by Marshall (Canon)
on Feb 20, 2012 at 10:53 UTC ( [id://955038]=note: print w/replies, xml ) Need Help??


in reply to Re: new to perl, syntax question
in thread new to perl, syntax question

Update: Again just genuinely trying to be helpful with a suggestion on how to print arbitrary results - for beginners, this is WAY COOL. Didn't mean to offend anybody.

I think better is to use the core module:

use Data::Dumper; .... print Dumper \@name;
Another module that you have to install before being able to use it:
use Data::Dump qw(pp); ..... print pp \@name;
Basically, both of these modules can print/dump an arbitrary Perl data structure.
The format of the output is a bit different, but they both can do it.
This is actually pretty much magic.
It is of huge help when debugging.
And it is of very huge help once you get into multidimensional data structures.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-16 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found