Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: String contents

by perlyr (Novice)
on Jun 29, 2012 at 07:17 UTC ( [id://979058]=note: print w/replies, xml ) Need Help??


in reply to Re: String contents
in thread String contents

you are right, I wanted to print out the string structure. If I know the structure, then I could extract it. Any other suggestions?

Replies are listed 'Best First'.
Re^3: String contents
by bitingduck (Chaplain) on Jun 29, 2012 at 07:23 UTC
    use strict; use warnings; use Data::Dumper; #do some stuff that generates a structure called $struct->stuff print Dumper($struct->stuff);

    or if you want a structure more stringified, use Data::Dump as already mentioned

      still not sure how to use it. Assumer my variable is $var, and my output filehandle is OUTFILE.When I tried the following, it failed. print Dumper($struct->stuff); print OUTFILE "stuff\n";

        Assumer my variable is $var , and my output filehandle is OUTFILE.When I tried the following, it failed.

        If your variable is called $var why are you trying to print $struct...?

        print OUTFILE Dumper( $var );

        perlintro

Re^3: String contents
by Anonymous Monk on Jun 29, 2012 at 07:21 UTC

    you are right, I wanted to print out the string structure. If I know the structure, then I could extract it. Any other suggestions?

    About what? Read How do I post a question effectively?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found