Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Data::Dumper is your friend. If your print line is really printing that, then $temp should look as follows when you use print Dumper $temp;
If that's the case, then you should be using $temp->[0] instead of @{$temp} as it returns the length of your array (which is 1) in scalar context. If this is entirely wrong, the reason I think $temp is an arrayref is because using @{$temp} doesn't result in strict going on how 120 isn't an arrayref at line blah. Also, the OP said he was able to print "\$temp = @{$temp}\n"; and it prints out 120 which would be expected behavior for an arrayref. Hope this helps. antirice In reply to Re: List or Scalar?
by antirice
|
|