Thread aktuelles Verzeichnis
(43 answers)
Opened by J-jayz-Z at 2005-05-15 02:55
Ich bekomm trotz hash und die "$!"; folgendes:
Code: (dl
)
1 rootcris@ingo:~/scripts$ ./filesize.pl -d /home/rootcris/filme/ Zeile 82: Code: (dl
)
$for{$file} = $_; Zeile 86: Code: (dl
)
my @sort = sort { $a <=> $b } @size; Zeile 91: Code: (dl
)
if (-f "$for{$_}") Da muss irgendwas mit dem hash nicht stimmen,wenn -d ein Verzeichniss ist... :( Hat da keiner ne idee? Ich denke mal, es hat etwas damit zu tun: Code: (dl
)
$hash{$_} = (-s $_); Nur wieso geht es bei dem normalen Aufruf und bei -d nicht? Ich bin voll am Verzweifeln... :rock: perl -Mstrict -Mwarnings -e 'package blub; sub new { bless {} } sub bar {my $self=shift; $self->{bla}="5065726c2d436f6d6d756e697479"; return $self->{bla};} my $foo=blub->new();print "Hallo ";print pack("H*",$foo->bar()); print "\n"'
http://perl-tutor.de |