in reply to Counting Elements output from Data::Dumper
$config contains a reference to an array, which you can access by dereferencing it: prefix it with an @ symbol. @$config or @{$config} literally means: the array referenced by $config. If $config refered to a hash, you'd use %$config to get it.my $length=scalar @$config;
Have a look at perlref for more information on references in Perl (which are somewhat like pointers in C, but then again, are not).
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Counting Elements output from Data::Dumper
by vbrtrmn (Pilgrim) on Nov 09, 2002 at 17:03 UTC | |
by robartes (Priest) on Nov 09, 2002 at 19:01 UTC |