in reply to Re^7: A TableMatrix row selection question
in thread A TableMatrix row selection question
#!/usr/bin/perl use warnings; use strict; { package My; use overload '""' => sub { "@{ $_[0] }" }; sub new { my $class = shift; bless [ @_ ], $class } } my $ar = 'My'->new(2, 3, 4, 5, 7); print ref $ar ? "Reference\n" : "Not a reference\n"; print $ar, "\n";
Update: ref $ar returns "My" in this case, not "ARRAY". So it can't be the case here, unless the class is named ARRAY.
|
|---|