Works fine for me.
package Car;
sub new { bless {},shift };
sub title { 'BITTER' };
sub descr { 'BUTTER' };
sub F { ( Car->new, Car->new, Car->new, Car->new ) };
package main;
print map{{title=>$_->title(),desc=>$_->descr()}} Car->F();
use Data::Dumper;
die Dumper map{{title=>$_->title(),desc=>$_->descr()}} Car->F();
__END__
HASH(0x1ab51f0)HASH(0x1ab5280)HASH(0x1ab5310)HASH(0x1ab53a0)$VAR1 = {
'title' => 'BITTER',
'desc' => 'BUTTER'
};
$VAR2 = {
'title' => 'BITTER',
'desc' => 'BUTTER'
};
$VAR3 = {
'title' => 'BITTER',
'desc' => 'BUTTER'
};
$VAR4 = {
'title' => 'BITTER',
'desc' => 'BUTTER'
};
You should take the
mystery out of the questions when you can (like with this Chars->get business).
What makes a bad question? Before You Post ... How (Not) To Ask A Question How to ask questions the smart way
____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.