in reply to
Re^4: Perl bug ?
in thread Perl bug ?
like I said. the first argument passed to ok() is $errors && ($errors-> =~ /.../i).
what gets really passed is $errors. it's like saying: my @foo = $errors && ($errors-> =~ /.../i)
the pattern match isn't executed at all at the first time.
but after processing the first argument, you use $errors-> in your second argument. now $errors is autovivified to an array ref before ok() is actyally executed. since $errors is passed as the first argument as an alias, it prints ARRAY(0x137cd48)