Hi James,
It looks like the object is based on a scalar. To see what I mean, play
with the code below. In the case of the output in your email, I suspect the
class name would have been on the line after "bless"
cheers,
Andrew
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
pa
On 2010.05.18 00:58, Uri Guttman wrote:
> SB> Perhaps I completely missed something within the latter posts to this
> SB> thread, so I must ask...
>
> SB> ...why not:
>
> SB> use Storable;
>
> SB> ...to store temporary data? I understood what Uri said, but does
> SB> Storable not co
> "SB" == Steve Bertrand writes:
SB> On 2010.05.17 00:12, Shawn H Corey wrote:
>> On 10-05-16 11:17 PM, Uri Guttman wrote:
>>> it can be used to save data (e.g. a config
>>> file) in a file for reloading in the future (via running the dumper
>>> output with eval).
>>
>> By savi
On 2010.05.17 00:12, Shawn H Corey wrote:
> On 10-05-16 11:17 PM, Uri Guttman wrote:
>> it can be used to save data (e.g. a config
>> file) in a file for reloading in the future (via running the dumper
>> output with eval).
>
> By saving the output of Data::Dumper to a *.pm file, it can be reloade
Thanks everyone,
I tried the module and it is great.
Thanks,
-Ben
On Mon, May 17, 2010 at 8:00 AM, Shawn H Corey wrote:
> On 10-05-17 10:35 AM, Eric Veith1 wrote:
>
>> "Bob McConnell" wrote on 05/17/2010 02:26:58 PM:
>>
>>> > What is the difference between this and exporting a YAML file? Wher
On 10-05-17 10:35 AM, Eric Veith1 wrote:
"Bob McConnell" wrote on 05/17/2010 02:26:58 PM:
> What is the difference between this and exporting a YAML file? Where
> would either be preferred over the other?
Except for the obvious syntax and that YAML might be easier to read for
"end users" tha
"Bob McConnell" wrote on 05/17/2010 02:26:58 PM:
> What is the difference between this and exporting a YAML file? Where
> would either be preferred over the other?
Except for the obvious syntax and that YAML might be easier to read for
"end users" that just happen to edit a config file, I guess t
From: Shawn H Corey
>On 10-05-16 11:17 PM, Uri Guttman wrote:
>> it can be used to save data (e.g. a config
>> file) in a file for reloading in the future (via running the dumper
>> output with eval).
>m
>mBy saving the output of Data::Dumper to a *.pm file, it can be
reloaded
>mvia "use".
What i
On 10-05-17 12:22 AM, Uri Guttman wrote:
SHC> # Set maximum depth for Data::Dumper, zero means unlimited
SHC> local $Data::Dumper::Maxdepth = 0;
why do you localize some but not all of the dumper options? local will
make it work only for a call in this scope which is file scope. better
t
> "SHC" == Shawn H Corey writes:
SHC> On 10-05-16 11:17 PM, Uri Guttman wrote:
>> it can be used to save data (e.g. a config
>> file) in a file for reloading in the future (via running the dumper
>> output with eval).
SHC> By saving the output of Data::Dumper to a *.pm file, it can
On 10-05-16 11:17 PM, Uri Guttman wrote:
it can be used to save data (e.g. a config
file) in a file for reloading in the future (via running the dumper
output with eval).
By saving the output of Data::Dumper to a *.pm file, it can be reloaded
via "use".
#!/usr/bin/perl
use strict;
use warni
> "PJ" == Peng, Jeff writes:
PJ> Dump the data structure for printing.
PJ> It's useful for checking the complex data strucure of Perl.
PJ> For example,
PJ> use Data::Dumper;
PJ> my %hash = ( 1 => [1,2,3,4],
PJ> 2 => { 1 => { 2 => [3,4,5] } },
PJ>);
Dump the data structure for printing.
It's useful for checking the complex data strucure of Perl.
For example,
use Data::Dumper;
my %hash = ( 1 => [1,2,3,4],
2 => { 1 => { 2 => [3,4,5] } },
);
print Dumper \%hash;
Run it and see what is printing.
Also you could check
e some time ago but it works for me.
Marcos
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 1:38 PM
To: [EMAIL PROTECTED]
Subject: Re: Data::Dumper trouble
Jan Eden wrote:
>
> I want to store some complex data. My first solution made use of
Jan Eden wrote:
>
> I want to store some complex data. My first solution made use of Storable, which
> worked just fine. Now I learned that neither Storable nor MLDBM are available on
> the machine I want to use the program on (and they cannot be made available).
>
> So I retreat to the core and us
Kevin Pfeiffer wrote:
> So in plain(er) English that means: if the name begins with an "*", the
> output type will match that of the referenced variable"?
Too complicated, and too "cute" to be practical. This would be much simpler if
all three of you were taking advice that is often given here:
Tore Aursand wrote:
> On Thu, 30 Oct 2003 23:45:25 +0100, Kevin Pfeiffer wrote:
> > print Dumper(\$hash_ref);
>
> I guess $hash_ref already _is_ a hash reference, so you don't need to
> reference it again;
>
> print Dumper( $hash_ref );
>
Probably not. If it had been he would have gotten bette
On Thu, 30 Oct 2003 16:53:14 -0500, Dan Anderson wrote:
> my $dumper = Data::Dumper->new( [%entry], [ qw () ] );
> my $dumpedvalues = $dumper->Dump();
> print $dumpedvalues . "\n";
Why all this fuss? :-) I constantly use this syntax:
use Data::Dumper;
print Dumper( \%hash );
Never bothered
On Thu, 30 Oct 2003 23:45:25 +0100, Kevin Pfeiffer wrote:
> print Dumper(\$hash_ref);
I guess $hash_ref already _is_ a hash reference, so you don't need to
reference it again;
print Dumper( $hash_ref );
--
Tore Aursand <[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
In article <[EMAIL PROTECTED]>, Kevin Old
wrote:
[...]
> Yeah, I guess that's it. I'm not really sure how it works (yet), but I
> got it from Programming Perl. Here's that whole subsection:
Thanks. I see I just need to "do my homework".
--
Kevin Pfeiffer
--
To unsubscribe, e-mail: [EMAIL PR
On Thu, 2003-10-30 at 18:09, Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, Kevin Old
> wrote:
> [...]
> > my %entry;
> >
> > $entry{"genre"} = "Rock";
> > $entry{"artist"} = "3 Doors Down";
> > $entry{"album"} = "Away from the Sun";
> > $entry{"disc"} = "Away from the Sun
In article <[EMAIL PROTECTED]>, Kevin Old
wrote:
[...]
> my %entry;
>
> $entry{"genre"} = "Rock";
> $entry{"artist"} = "3 Doors Down";
> $entry{"album"} = "Away from the Sun";
> $entry{"disc"} = "Away from the Sun";
> $entry{"file"} = "3dd.mp3";
> $entry{"fullpath"} = "/mp3
On Thu, 2003-10-30 at 16:53, Dan Anderson wrote:
> When I use the following code to dump a hash:
>
> $entry{"genre"} = $genre;
> $entry{"artist"} = $artist;
> $entry{"album"} = $album;
> $entry{"disc"} = $disc;
> $entry{"file"} = $file;
> $entry{"fullpath"} = $fullpath;
>
In article <[EMAIL PROTECTED]>, Dan Anderson wrote:
> When I use the following code to dump a hash:
[...]
> I've figured out that I can use qw() to change the variable names, but
> is there any way to either get an output like the code that created the
> hash, or in the form:
>
> $hash = {
>
On Tue, 2002-03-19 at 05:44, [EMAIL PROTECTED] wrote:
> heh - that was exactly half of what i was looking for - how to dump stuff! great :)
>
> mayby you can help me out with the second part too? :
>
> if i have a datastructure (a hash) dumped to a file using Data::Dumper,
> how can i recreate t
heh - that was exactly half of what i was looking for - how to dump stuff! great :)
mayby you can help me out with the second part too? :
if i have a datastructure (a hash) dumped to a file using Data::Dumper,
how can i recreate the datastructure/hash in another program?
if i do something like
On Tue, 2002-03-19 at 04:11, [EMAIL PROTECTED] wrote:
> hi
>
> i have read the documentation on Data::Dumper from Learning Perl, Perl Cookbook and
>perldoc. however, im still very confused. im looking for some beginners documentation
>and examples. can anyone direct me?
>
> :o)
>
> martin
pe
l Gardner
> Cc: Robert Thompson; [EMAIL PROTECTED]
> Subject: Re: Data::Dumper and eval question
>
>
> The more I thought about it, Data::Dumper has little to
> do with the exact problem I am having, but the way it works
> constricts me to using particular steps in my sc
From: Robert Thompson <[EMAIL PROTECTED]>
> The more I thought about it, Data::Dumper has little to do with the
> exact problem I am having, but the way it works constricts me to
> using particular steps in my script. Data::Dumper is a utility to
> build simple text based dat
The more I thought about it, Data::Dumper has little to do with the exact
problem I am having, but the way it works constricts me to using particular steps in
my script. Data::Dumper is a utility to build simple text based databases. Basically
what it does is take input data, escapes an
From: Robert Thompson <[EMAIL PROTECTED]>
> I am using Data:Dumper in a script and am running into a problem with
> "use strict" and eval. Basically the conundrum is that the data I
> will be loading from the Data::Dumper file is going to be based off
> input to the final scr
Tuesday, December 11, 2001, 1:09:06 AM, Robert Thompson wrote:
> I am using Data:Dumper in a script and am running into a problem with "use
>strict" and eval. Basically the conundrum is that the data I will be loading from the
>Data::Dumper file is going
> to be based off input to the f
>Could someone please help me translate this. All I can figure out for sure
>are the first 2 lines. For a class assignment we need to: Read the
>documentation on the Data::Dumper module (type 'perldoc Data::Dumper' ).
>Use it to display the contents of your data structure. Thanks in advance.
33 matches
Mail list logo