in reply to A moment with Perl

Hi Lady_Aleena,

If you haven't done so already, take a look at perldata.

Also, (again, if this is new to you), look into using Data::Dumper.  It's a fantastic, simple way of verifying exactly what a given data structure looks like.

For example:

use strict; use warnings; use Data::Dumper; my $pdata = { 'red' => [ 'abc', 'def', 'ghi' ], 'blue' => { '123' => '456', 'xxx' => 'yyy' }, }; print "Dump of pdata = ", Dumper($pdata), "\n";

which prints:

Dump of pdata = $VAR1 = { 'blue' => { '123' => '456', 'xxx' => 'yyy' }, 'red' => [ 'abc', 'def', 'ghi' ] };

And that tells you that you have a hash ($pdata) containing two keys, 'blue' and 'red', where 'blue' is a pointer to a hash containing two keys and two values, and 'red' is a pointer to an array containing 3 values.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: A moment with Perl
by Lady_Aleena (Priest) on Oct 07, 2007 at 14:17 UTC

    liverpole;

    I will take a closer look at perldata in a little bit. I have already looked into Data::Dumper a little bit. I do have to figure out how to write my HoHoA, but I will get there, some day, hopefully, soon.

    Thank you for stopping by and have a wonderful day!

    Lady Aleena

    "An it harm none, do as ye will."

A reply falls below the community's threshold of quality. You may see it by logging in.