Dr.Ruud wrote:
> Shawn H Corey wrote:
>
>> use Data::Dumper;
>>
>> # Make Data::Dumper pretty
>> $Data::Dumper::Sortkeys = 1;
>> $Data::Dumper::Indent = 1;
>>
>> # Set maximum depth for Data::Dumper, zero means unlimited
>> $Data::Dumper::Maxdepth = 0;
>
> Variant:
>
> use Data::Dumper;
> {pac
Shawn H Corey wrote:
use Data::Dumper;
# Make Data::Dumper pretty
$Data::Dumper::Sortkeys = 1;
$Data::Dumper::Indent = 1;
# Set maximum depth for Data::Dumper, zero means unlimited
$Data::Dumper::Maxdepth = 0;
Variant:
use Data::Dumper;
{package Data::Dumper;our($Indent,$Sortkeys,$Terse,$
> "JF" == Jeremiah Foster writes:
JF> # autovivfy a hash with versions of packages
JF> $versions{$package} = [ ] unless exists $versions{$package};
that is MANUALLY vivifying an array. if you just pushed to the slot with
a dereference, that would be autovivifying. only p
Jeremiah Foster wrote:
Hi there!
Hello,
This may or may not be a beginners question. If not, please let me
know where I ought to post. :-)
I have a data structure, a simple array. It is made up of sections of
files I have slurped;
sub _build_packages {
use Perl6::Slurp;
Do you reall
On Nov 28, 2009, at 15:25, Shawn H Corey wrote:
> Jeremiah Foster wrote:
>>> my %versions;
>>> map {
>>> my $package = $_;
>>> # autovivfy a hash with versions of packages
>>> $versions{$package} = [ ] unless exists $versions{$package};
>> push @{ $versions{$
Jeremiah Foster wrote:
>> my %versions;
>>map {
>> my $package = $_;
>> # autovivfy a hash with versions of packages
>> $versions{$package} = [ ] unless exists $versions{$package};
> push @{ $versions{$package} = $version
>} @packages
You don't
Edit: Added missing 'push' to code example.
On Nov 28, 2009, at 14:13, Jeremiah Foster wrote:
> Hi there!
>
> This may or may not be a beginners question. If not, please let me know
> where I ought to post. :-)
>
> I have a data structure, a simple array. It is made up of sections