note
LanX
the code "works" mostly, it's populating the arrays.<P><P>
you are just printing empty lines instead of the content of the arrays.<P><P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-708738">
<p>Cheers Rolf
<p> <small>( addicted to the Perl Programming Language) </small>
</div></div><P><P>
<H5> update<P></H5><P>
Plz be aware that you are excluding any file or dir starting with a dot.<P><P>
<c>
use strict;
use warnings;
use Data::Dump qw/pp/;
my $path="/tmp";
opendir ( DIR, $path ) || die "Error in opening dir $path\n";
my (@file,@dir);
while (my $filename=readdir(DIR)) {
next if ($filename =~ m/^\./);
if (-f $filename) {
push(@file,$filename);
# print "\n";
} elsif (-d $filename){
push(@dir,$filename);
# print "\n";
}
}
pp \@file,\@dir;
</c>
1069560
1069565