> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes:
Rob> You could forget about diagnosing the problem and just use
Rob> my $n = unlink grep -f, glob '/test/directory/klee*';
Rob> print "$n files deleted\n";
Unless you're running an older Perl, where that'll fire off a shell
to do the glob(
The code below works. Thanks for the pointers on the unless loop,
haven't used that before. It appears that the limitation I was running
into was only on my Mac perl config; the code works fine under linux.
#!/usr/bin/perl -w
#open directory and load contents into hash
use strict;
my $dir="/te
On Jan 5, 2004, at 2:23 AM, [EMAIL PROTECTED] wrote:
I tried explicitly declaring DIR as an array, but I guess handles
don't do that. How do I load all of the directory into an array, or
more specifically why am I only getting half?
#!/usr/bin/perl
use strict;
use warnings;
my $dir = shift; #
Charles Harvey wrote:
>
> I have a Mac client that is grabbing pictures and writing them
> to a netatalk share, and the files prefix with klee and then are
> one-up serialized (not my design, I just do networking). The PC
> client grabs the images via samba share and displays them. This
> is par
> That looks very, very wrong. You're binding a scalar to
> something other than a regular expression. Tell us what you
> are attempting to do here.
>
> HTH,
>
> Charles K. Clarkson
yeah, I agree. Here is the scenario:
I have a Mac client that is grabbing pictures and writing them to a ne
On Jan 05 12:13, Ramprasad A Padmanabhan <[EMAIL PROTECTED]> wrote:
>
>
> But why do you want to do it in perl ( why not rm -f $dir/* $dir/.* )
> , If you are removing all the 4000 files everytime it might make sense
> to remove the entire directory and recreate it.
>
>
> Ram
>
That is what
Charles Harvey wrote:
Hello all,
I am trying empty a directory with over 4000 files with a script, and do
not understand why I can only delete half at a time. I am guessing that
the directory handle has a size limitation?? Is there a way to load the
contents into a large array or am I going a
Charles Harvey wrote:
> Hello all,
>
> I am trying empty a directory with over 4000 files with a script, and
> do not understand why I can only delete half at a time. I am guessing
> that the directory handle has a size limitation?? Is there a way to
> load the contents into a large array or am
Charles Harvey <[EMAIL PROTECTED]> wrote:
:
: I am trying empty a directory with over 4000 files with a
: script, and do not understand why I can only delete half
: at a time. I am guessing that the directory handle has a
: size limitation?? Is there a way to load the contents
: into a large arra