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

RFC: Data::Dumper::Simple

by Ovid (Cardinal)
on Jul 31, 2004 at 04:18 UTC ( #378865=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      warn Data::Dumper->Dump(
        [$foo, \%this, \@array, \%that],
        [qw/*foo *that *array *this/]
      );
    
  2. or download this
    use Data::Dumper::Simple;
    warn Dumper($foo, %this, @array, %that);
    
  3. or download this
     use Data::Dumper;
     warn Dumper($foo, $bar, $baz);
    
  4. or download this
     $VAR1 = 3;
     $VAR2 = 2;
     $VAR3 = 1;
    
  5. or download this
      warn Data::Dumper->Dump(
        [$foo, $bar, $baz],
        [qw/*foo *bar *baz/]
      );
    
  6. or download this
      $foo = 3;
      $bar = 2;
      $baz = 1;
    
  7. or download this
      warn Data::Dumper->Dump(
        [$foo, \@array],
        [qw/*foo *array/]
      );
    
  8. or download this
      $foo = 3;
      @array = (
                 8,
                 'Ovid'
               );
    
  9. or download this
      warn Data::Dumper->Dump(
        [$foo, \%this, \@array, \%that],
        [qw/*foo *that *array *this/]
      );
    
  10. or download this
      use Data::Dumper::Simple.
      warn Dumper($scalar, @array, %hash);
    
  11. or download this
      $scalar = 'Ovid';
      @array = (
    ...
                'I' => 'hope',
                'at' => 'least'
              );
    
  12. or download this
     my $foo   = { hash => 'ref' };
     my @foo   = qw/foo bar baz/;
     warn Dumper ($foo, \@foo);
    
  13. or download this
     $foo = {
       'hash' => 'ref'
    ...
       'bar',
       'baz'
     );
    
  14. or download this
      Dumper($foo, some_sub()); # Bad!
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://378865]
Approved by elusion
Front-paged by gmax
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2021-04-23 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?