|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Push from filefind into structureby mbethke (Hermit) |
| on Feb 03, 2012 at 03:46 UTC ( #951592=note: print w/ replies, xml ) | Need Help?? |
|
The problematic line is this: $self->{found_files} = @found_files;$self->{found_files} is a scalar and thus provides scalar context to the right side. So @found_files evaluates to the number of its elements, but you'll later treat it like an array reference. Just put a backslash in front of it to take its reference. The array is a copy of the arguments already so saying ... = [ @found_files ]; would do too but do extra needless copying.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||