http://www.perlmonks.org?node_id=114279


in reply to Re: obj dump
in thread obj dump

Its tough write an elaborate answer to such a minimal question. We don't even know what that code is supposed to do. Try framing the code with how you are using it, what the interesting parts are, what problems you're having with it, etc.

Time spent asking a good question will be rewarded with meaningful answers. Read dominus's comments on how to ask a good question. After all, if you aren't willing to invest more than five words, why should we?

-Blake

Replies are listed 'Best First'.
Re: obj dump
by Anonymous Monk on Sep 24, 2001 at 15:07 UTC
    I was hoping someone here could explain what this does.. I only know it's a obj dumper, but I don't know much else and I was trying to figure out how it works..

      Perl comes standard with Data::Dumper, which is useful for printing out complex data structures (and even for loading them up again if you need to -- it's nice for simple configuration files). I'm afraid that the only person who could give you a definitive answer about what the code you posted does and how it works is the original author (and maybe not even that person, memory being what it is).

      Sample usage (very silly) :

      #/usr/bin/perl -w use strict; use Data::Dumper; my $obj = { foo=> [0..4], bar=>"wouldn't it be nice?", baz=>[ qw(if we were older) ], bletch=>"Then we wouldn't have to ... ummm, something +something"}; print Data::Dumper->Dump( [ $obj ]);

      Try that and take a peek at the output.

      HTH!

      perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'