From: deny <[EMAIL PROTECTED]> > here is the complete code > > #!/usr/bin/perl > > use MD5; > require 'find.pl'; > > $md5 = new MD5; > @dirs = @ARGV; > > foreach $dir ( @dirs ) { find($dir); } > sub wanted { push @files, $name; } > > foreach $name ( sort @files) { > ($uid,$gid) = (stat $nane)[4,5]; > $stat = sprintf "%0o", (stat_)[2]; > unless( -f $name ) { > printf "$stat\t$uid $gid\t\t\t\t\t\t$name\n";
You should either be using print(): print "$stat\t$uid $gid\t\t\t\t\t\t$name\n"; or use printf() the way it was meant tu be. The first argument to printf should be "format", then you should specify the variables: printf "%d\t%d %d\t\t\t\t\t\t%s\n", $stat, $uid, $gid, $name; I think the other problem is that you only store the names of the files, not paths in the @files array. So stat() is not able to find the files. If would probably be best to do the stat() and print the result directly from the wanted() subroutine. Jenda P.S.: What the heck is find.pl? You should be using File::Find! ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>