The find function does not return the result of the search. May be you were thinking of File::Find::Rule where the find function does return a list of files found. Your script would then become:
use strict; use File::Find::Rule; my @array = File::Find::Rule->new->in($dirphoto);
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In reply to Re: return an array from File::Find
by CountZero
in thread return an array from File::Find
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |