Thread Unterschiedliche MD5 Ergebnisse (35 answers)
Opened by Rambo at 2006-05-11 18:46

pq
 2006-05-18 16:41
#66017 #66017
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
[quote=renee,18.05.2006, 12:54]Und in $File::Find::name steht doch der absolute Pfad drin, also sollte es auch mit $File::Find::name funktionieren...[/quote]
naja, wie ich im anderen posting sagte: wenn man der subroutine find() einen
abosluten pfad mitgibt, ja. aber eben nicht, wenn er relativ ist.

ok, bitte:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
$ perl -wle'
use File::Find;
my (@files_a, @files_b);
find(sub {
   push @files_a, $File::Find::name if -f $File::Find::name;
   push @files_b, $File::Find::name if -f $_;
}, "./testdir");
print "a: (@files_a)\nb: (@files_b)"'
a: ()
b: (./testdir/file ./testdir/sub1/file ./testdir/sub2/file)
\n\n

<!--EDIT|pq|1147956240-->
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Unterschiedliche MD5 Ergebnisse