Re: large directory handling

2004-01-04 Thread Ramprasad A Padmanabhan
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

Re: large directory handling

2004-01-04 Thread R. Joseph Newton
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

RE: Getting the total size of a directory

2004-01-04 Thread Tim Johnson
"Arching" google? I can't even remember what I was trying to say. Oh, well, that's what I get for CUI (coding under the influence). -Original Message- From: Tim Johnson Sent: Sunday, January 04, 2004 7:21 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Getting the total size

RE: large directory handling

2004-01-04 Thread Charles K. Clarkson
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

large directory handling

2004-01-04 Thread Charles Harvey
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 about this all wrong?

RE: Getting the total size of a directory

2004-01-04 Thread Tim Johnson
I think there was a very recent thread on this, but here's one way using File::Find, taking a little from a result I found by arching Google: ## use File::Find; use strict; my $dir = $ARGV[0]; my $size; find(sub{ -f and ( $size += -s ) }, $dir ); $size = sprintf("

Re: Making A Library of Perl Subroutines

2004-01-04 Thread drieux
On Jan 4, 2004, at 6:18 PM, r huber wrote: I am writing several subroutines that I want to make available to other programs without directly including the code in those programs. Can anyone explain how to do this or where to go to find out how to do it. Tim and Owen have offered the quick look ans

Re: Making A Library of Perl Subroutines

2004-01-04 Thread Owen Cook
On Mon, 5 Jan 2004, Owen Cook wrote: > > On Sun, 4 Jan 2004, r huber wrote: > > > I am writing several subroutines that I want to make > > available to other programs without directly including > > the code in those programs. Can anyone explain how to > > do this or where to go to find out how

RE: Making A Library of Perl Subroutines

2004-01-04 Thread Tim Johnson
Other than the require method suggested, you might also want to think about making a pure perl module. It's not that hard, and it makes it much easier to copy the code to other computers if you ever want to. Here's an example of a simple module: # # Sample.pm

Re: Making A Library of Perl Subroutines

2004-01-04 Thread Owen Cook
On Sun, 4 Jan 2004, r huber wrote: > I am writing several subroutines that I want to make > available to other programs without directly including > the code in those programs. Can anyone explain how to > do this or where to go to find out how to do it. Just make a file "mylibrary.pl" or what ev

Making A Library of Perl Subroutines

2004-01-04 Thread r huber
I am writing several subroutines that I want to make available to other programs without directly including the code in those programs. Can anyone explain how to do this or where to go to find out how to do it. TIA, rj __ Do you Yahoo!? Find out what made the Top Y

Getting the total size of a directory

2004-01-04 Thread Motherofperls
I'm running out of web space and want to write a script that tell me the size of certain directories so I can see where the hog is. Can anyone give me some quick code?

Re: taking my vbscript to perl

2004-01-04 Thread R. Joseph Newton
Saadat Saeed wrote: > Hello, now I am a newbie to perl & would like to > migrate my existing knowledge... Don't bother. Perl has its own internal structure and logic, and can do a simple file-search with much less overhead. opendir BASE_DIR, $base_folder; while (my $filename = ) { next if $f

Re: SQL annoyance

2004-01-04 Thread R. Joseph Newton
dan wrote: > Hi there, quick and annoying SQL problem, was debating about whether to post > it here or DBI, I figured DBI was for DBI related issues, and this is just a > plain SQL problem. So it should really be posted on an RDBMS list. > Excuse me if I'm wrong though, but thought I'd ask > any

Re: piped system commands

2004-01-04 Thread deb
John, thanks for the "perl" approach. Mustn't forget about that! deb At 20:59:59, on 01.02.04: Cracks in my tinfoil beanie allowed John W. Krahn to seep these bits into my brain:, > Deb wrote: > > > > I want to run a command inside a script. From the shell, here's the command: > > > > % ps -

Re: Hacks via Slow regular expressions

2004-01-04 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dan Anderson) writes: > >I was reading O'Reilly's Programming Perl, and under the >security section it says that regular expressions from outside the >program are not trusted because it is possible that they can take >foreve

Re: taking my vbscript to perl

2004-01-04 Thread Jenda Krynicky
From: Saadat Saeed <[EMAIL PROTECTED]> > Hello, now I am a newbie to perl & would like to > migrate my existing knowledge... > > Would anypone give me a crash course here... how would > my following short vbscript correspond in perl. > > Set objShell = CreateObject ("Shell.Application") > Set

RE: taking my vbscript to perl

2004-01-04 Thread Charles K. Clarkson
Saadat Saeed <[EMAIL PROTECTED]> wrote: : : Hello, now I am a newbie to perl & would like to : migrate my existing knowledge... : : Would anypone give me a crash course here... how : would my following short vbscript correspond in : perl? I do some of this on a web site I master. The best ap

taking my vbscript to perl

2004-01-04 Thread Saadat Saeed
Hello, now I am a newbie to perl & would like to migrate my existing knowledge... Would anypone give me a crash course here... how would my following short vbscript correspond in perl. Set objShell = CreateObject ("Shell.Application") Set objFSO = CreateObject("Scripting.FileSystemObject") st

Re: SQL annoyance

2004-01-04 Thread Rob Dixon
Dan wrote: > > Hi there, quick and annoying SQL problem, was debating about whether to post > it here or DBI, I figured DBI was for DBI related issues, and this is just a > plain SQL problem. Excuse me if I'm wrong though, but thought I'd ask > anyway. > > I have an SQL statement as follows, > >

Re: SQL annoyance

2004-01-04 Thread Philipp Traeder
Hi Dan, On Sun, 2004-01-04 at 03:34, dan wrote: > I have an SQL statement as follows, > SELECT * FROM memodata WHERE to=1 AND readdate=sent ORDER BY id ASC > which fails giving an error on the to=1 part. > I've tried doing that statement without the 'to=1 AND' part, and it works > fine returning a

SQL annoyance

2004-01-04 Thread dan
Hi there, quick and annoying SQL problem, was debating about whether to post it here or DBI, I figured DBI was for DBI related issues, and this is just a plain SQL problem. Excuse me if I'm wrong though, but thought I'd ask anyway. I have an SQL statement as follows, SELECT * FROM memodata WHERE to

Re: Simple db - PERL vs MS SQL Server

2004-01-04 Thread Robert
"Andy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > I currently have a very simple, fairly small (25,000 records), one table > database in MS SQL Server that is accessed for read only & read / write > (dependant on user interface) via ASP on IIS (running on NT4 SP6). >