Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: String contents

by bitingduck (Chaplain)
on Jun 29, 2012 at 07:23 UTC ( #979061=note: print w/replies, xml ) Need Help??


in reply to Re^2: String contents
in thread String contents

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

Replies are listed 'Best First'.
Re^4: String contents
by perlyr (Novice) on Jun 29, 2012 at 07:32 UTC
    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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://979061]
help
Chatterbox?
[LanX]: <|--
[choroba]: Reminds me of an old joke about an orchestra...
erix imagines that in a true Lancs accent
[choroba]: so a Czech orchestra rehearses a new piece by a German composer
LanX LOL of the day ... the Turkish Anonymous Alcoholics stopped their "No to alcohol" campaign for political reasons ...
LanX omg my browser is posting again on its own ...
[LanX]: choroba: GREAT JOKE! xD
LanX starts googling the punch line ...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-03-27 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (319 votes). Check out past polls.