Code:
#!/usr/bin/perl
my $dir_to_process = "/tmp";
my @files = split("\n", `find $dir_to_process -type f -perm -o+rx`);
foreach my $filename (@files) {
print "Do something on ($filename)\n";
}
#!/usr/bin/perl
my $dir_to_process = "/tmp";
my @files = split("\n", `find $dir_to_process -type f -perm -o+rx`);
foreach my $filename (@files) {
print "Do something on ($filename)\n";
}
#!/usr/bin/perl
my $dir_to_process = "/tmp";
opendir (DIR, $dir_to_process) || $dir or die "Cannot open $dir: $!";
while (my $name = readdir DIR) {
next if $name =~ /^\./;
$filename = "/tmp/".$name;
if (-x $filename)
#!/usr/bin/perl my $dir_to_process = "/tmp"; opendir (DIR, $dir_to_process) || $dir or die "Cannot open $dir: $!"; while
#!/usr/bin/perl
my $dir_to_process = "/tmp";
opendir (DIR, $dir_to_process) || $dir or die "Cannot open $dir: $!";
while (my $name = readdir DIR) {
next if $name =~ /^\./;
if
Leave a comment: