http://www.perlmonks.org?node_id=596291


in reply to map return to array reference

@{$self->_getGood()}

If $self->_getGood returns an array (or, indeed, a list) then there's no need to dereference it again.

I assume that '6' is the first item in the returned list.

my $files_to_send = map {"$stage/$_.pdf"} $self->_getGood();

But as you hint that you already know, you shouldn't be assigning that to a scalar, so you probably want:

my $files_to_send = [ map {"$stage/$_.pdf"} $self->_getGood() ];