Re: find2perl output to array

2007-06-20 Thread Randal L. Schwartz
> "Matt" == Matt <[EMAIL PROTECTED]> writes: Matt> #!/usr/bin/perl use File::Finder; # in the CPAN Matt> $cuid = "aef"; Matt> $directory = "EOM033107"; Matt> $smallcuid = lc $cuid; my @result = File::Finder->type('f')->name(qr/^DATA.*\.zip\z/)->in( '/home/ftpuser/'.$smallcuid.'/flexvaul

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi, > Ahh, very good. Thanks Rob (and Martin from earlier). I think I > understand now. It calls the wanted sub routine, populates the @files > array for each iteration. Then when that completes the contents of the > array @files are printed. . .? > > Matt > you're right, Matt. the name

Re: find2perl output to array

2007-06-19 Thread Matt
Rob Dixon wrote: Matt wrote: Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name;

Re: find2perl output to array

2007-06-19 Thread Matt
Martin Barth wrote: Hi Matt, I did that, and then at the bottom of the script I tried looping through just to verify that @files was populated - no dice. (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, name; What have I do

Re: find2perl output to array

2007-06-19 Thread Rob Dixon
Matt wrote: Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name; at the end you

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi Matt, > I did that, and then at the bottom of the script I tried looping through > just to verify that @files was populated - no dice. > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && push @files, name; > What have I done wrong? push @files, $name;

Re: find2perl output to array

2007-06-19 Thread Matt
Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name; at the end you have all f

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi, change following line: > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && print("$name\n"); to > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && push @files, $name; at the end you have all files in the @files ar

find2perl output to array

2007-06-19 Thread Matt
Using the find2perl utility how would I send the output to an array? By default it will print out the results like: /home/ftpuser/aef/flexvault/EOM033107/DATAAG.zip /home/ftpuser/aef/flexvault/EOM033107/DATAHZ.zip I'd like those lines to be put into an array instead of printed to stdout. I