Beckett Richard-qswi266 wrote:

> Guys,
> 
> I've just started playing with the debugger that came with the perl dev kit, and I'm 
> wondering if it's possible to view the contents of an array?
> 
> I have @ARVG, but if I evaluate it, I get 4, which I should have expected, I 
> suppose, but I would also like to see what the array elements are. Is this possible?

You're getting the scalar context.  You can print an array via
several methods :

print "[EMAIL PROTECTED]";      # you'll get a space separated printout

print "array contents:\n";
print "\t$_\n" foreach @array;  # one element per line

print join '|', @array; # pipe separated list
print "\n";

use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Sortkeys=1;
print Data::Dumper->Dump([EMAIL PROTECTED], [qw([EMAIL PROTECTED])]);   # I usually 
use a ref to the array
or
print Data::Dumper::Dumper([EMAIL PROTECTED]);                  # with Data::Dumper 
for looks

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to