my $attr = $foo->attr; print "Attribute is $attr\n"; print "Attribute is ". $foo->attr ."\n"; print "Attribute is @{[$foo->attr]}\n";