schms schreef:
opendir DH, $DIR or die Cannot open '$DIR' $!;
print map $DIR/$_\n, readdir DH;
closedir DH;
Looks very 'global variables' oriented to me.
Compare to:
{ opendir my $dh, $dir
or die Cannot open '$dir': $!;
while (my $e = readdir $dh) {
$e =
Hi,
I have a UNIX directory $DIR which contains a lot of files and
subdirecotires. Now, I would
like to list all files and subdirectories in $DIR only. That means,
$File::Find should not
go into any subdirectories of $DIR and list the files and
subdirectories there as well.
So far, I have not
schms wrote:
Hi,
Hello,
I have a UNIX directory $DIR which contains a lot of files and
subdirecotires. Now, I would like to list all files and
subdirectories in $DIR only. That means, $File::Find should not
go into any subdirectories of $DIR and list the files and
subdirectories there as
On Sep 27, 6:00 am, [EMAIL PROTECTED] (Schms) wrote:
I have a UNIX directory $DIR which contains a lot of files and
subdirecotires. Now, I would
like to list all files and subdirectories in $DIR only. That means,
$File::Find should not
go into any subdirectories of $DIR and list the files
On 27 Sep., 15:01, [EMAIL PROTECTED] (Paul Lalli) wrote:
On Sep 27, 6:00 am, [EMAIL PROTECTED] (Schms) wrote:
I have a UNIX directory $DIR which contains a lot of files and
subdirecotires. Now, I would
like to list all files and subdirectories in $DIR only. That means,
$File::Find
On 18 Sep 2006 at 22:34, John W. Krahn wrote:
I see. Thanx
And this I guess:
Ternary ``?:'' is the conditional operator, just as in C. It works
much like an if-then-else. If the argument before the ? is true, the
argument before the : is returned, otherwise the argument after the :
is
John W. Krahn wrote:
Emilio Casbas wrote:
Hi,
Hello,
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory search for a given ARG
On 09/18/2006 10:11 AM, Emilio Casbas wrote:
Hi,
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory search for a given ARG, but no a recursive
search
Hi,
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory search for a given ARG, but no a recursive
search, for example
this script show this;
[EMAIL
On 9/18/06, Emilio Casbas [EMAIL PROTECTED] wrote:
Hi,
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory search for a given ARG, but no a recursive
Emilio Casbas am Montag, 18. September 2006 17:11:
Hi,
Hi Emilio
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory search for a given ARG
Emilio Casbas wrote:
Hi,
Hello,
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory search for a given ARG, but no a recursive
search
On 18 Sep 2006 at 15:05, John W. Krahn wrote:
Emilio Casbas wrote:
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory
Beginner wrote on Mon, Sep 18, 2006 at 03:24:08PM PDT:
On 18 Sep 2006 at 15:05, John W. Krahn wrote:
opendir my $dh, $dir or die Cannot open '$dir' $!;
print $dir\n,
map !/\A\.\.?\z/ -d $dir/$_ ? $dir/$_\n : (),
readdir $dh;
John
That's looks nice John...but what
Beginner wrote:
On 18 Sep 2006 at 15:05, John W. Krahn wrote:
my $dir = '/tmp';
opendir my $dh, $dir or die Cannot open '$dir' $!;
print $dir\n,
map !/\A\.\.?\z/ -d $dir/$_ ? $dir/$_\n : (),
readdir $dh;
That's looks nice John...but what is actually happening here. Some
sort
15 matches
Mail list logo