Re: perl bug with references



On 28 Feb., 03:13, "dt" <p...@xxxxxxxxxxxxxx> wrote:
I found an odd behavior.

when I have a reference, let's say it is an array, it seems to pad the
value differently in perl 5.6 vs 5.8:

this worked in perl 5.8 but not perl 5.6:

$ref =~ /^ARRAY/;

for 5.6, I had to change to =~ /^\s*ARRAY/;


I have same results with perl 5.6.

perldoc -f ref

hope that helps,

Thomas

.



Relevant Pages

  • Re: Complex Objects in Perl
    ... > Objects in Perl are implemented as a reference to an ... > anonymous hash. ... > array or a hash or it may be another object (reference to ... > installation of perl: ...
    (comp.lang.perl)
  • Re: Complex Objects in Perl
    ... > sub-object is made up of a number of different objects and an array of an ... Objects in Perl are implemented as a reference to an anonymous hash. ...
    (comp.lang.perl)
  • Re: Learning Perl
    ... it should be an array, ... Then they'd be completely inaccessible to beginners. ... that should be my $var. ... so why is it redundant to point out that Perl is different from C here? ...
    (comp.lang.perl.misc)
  • Re: Complex Objects in Perl
    ... >> Objects in Perl are implemented as a reference to an anonymous hash. ... >> enumerate over array and hash members as you would enumerate over any ...
    (comp.lang.perl)
  • Re: Which is faster - hash or array lookup
    ... I am suite sure that perl is not The Right Tool ... Each player has 5 pieces, and additionally there is a common ... whereas traversing an array looking for $n is slow). ...
    (comp.lang.perl.misc)