in reply to Unusual "Can't locate object method"

It seems $file->tag->title returns a Audio::TagLib::String object, while $file->tag->track returns a plain number.

How do I know?

say 'title:', ref $file->tag->title; # Audio::TagLib::String say 'track:', ref $file->tag->track; # Nothing.

BTW: It also seems the CPAN module Audio::TagLib doesn't correctly declare Path::Class as its dependency.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]