nysus has asked for the wisdom of the Perl Monks concerning the following question:
I dumped a hash into a file and then copied into the __DATA__section of my script. $Data::Dumper::Purity = 1; was set prior to outputting to file:
use strict; use warnings; use Data::Dumper qw(Dumper); my $hash; { local $/; $hash = <DATA>; } $hash = eval { $hash }; print keys %$hash; # error __DATA__ $VAR1 = { 'blah.com' => [ '212.235.56.176' ], 'blah.org' => [ '212.235.56.176' ], 'www.boo.org' => [ '212.235.56.176' ], };
I tried getting rid of $VAR1 in __DATA__ but that didn't help.
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: unable to eval dumped hash
by kcott (Archbishop) on Apr 28, 2020 at 08:01 UTC | |
by nysus (Parson) on Apr 28, 2020 at 14:00 UTC | |
Re: unable to eval dumped hash
by bliako (Monsignor) on Apr 28, 2020 at 08:14 UTC | |
by jcb (Parson) on Apr 29, 2020 at 01:15 UTC | |
by afoken (Chancellor) on Apr 29, 2020 at 17:37 UTC | |
by jcb (Parson) on Apr 30, 2020 at 01:28 UTC | |
by haukex (Archbishop) on May 02, 2020 at 09:39 UTC | |
Re: unable to eval dumped hash
by nysus (Parson) on Apr 28, 2020 at 00:44 UTC | |
Re: unable to eval dumped hash
by BillKSmith (Monsignor) on Apr 28, 2020 at 14:48 UTC | |
Re: unable to eval dumped hash
by Anonymous Monk on Apr 28, 2020 at 00:20 UTC | |
by nysus (Parson) on Apr 28, 2020 at 00:22 UTC | |
Re: unable to eval dumped hash
by haukex (Archbishop) on May 02, 2020 at 09:54 UTC |
Back to
Seekers of Perl Wisdom