> "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
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
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;
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
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
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;
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
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
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