Re: script for deleting server log files

2003-02-23 Thread R. Joseph Newton
Ronen Kfir wrote: > Hi, > > I have log files on an IIS web server (WIN2K), that I want to delete > after a couple of days, lets say -14. I want the script to run under a > schedule, and delete those files. Hi Ronen, Why waste your time programming this. If you are doing this on a W2K server, ma

Re: Perl MD5 question

2003-02-23 Thread John W. Krahn
Benjamin Outram wrote: > > Hello, Hello, > I am trying to figure out why $md5->add("abc") does not give the same digest > as > > $value = pack('N*',(0x0061,0x0062,0x0063); ^ You have an extra left parenthesis there. Actually that line would be valid without any parenthesis

RE: bitwise?

2003-02-23 Thread jdavis
On Sun, 2003-02-23 at 03:41, Beau E. Cox wrote: > Hi - > > > -Original Message- > > From: jdavis [mailto:[EMAIL PROTECTED] > > Sent: Saturday, February 22, 2003 11:52 PM > > To: perl > > Subject: bitwise? > > > > > > Hello, > > Could someone explain what bitwise means? I am reading > >

Perl MD5 question

2003-02-23 Thread Benjamin Outram
Hello, I am trying to figure out why $md5->add("abc") does not give the same digest as $value = pack('N*',(0x0061,0x0062,0x0063); $md5->add($value); I thought that passing characters to the 'add' method was the same as passing a stream of character byte representations. Any help would be great.

Re: reading from a pipe

2003-02-23 Thread Bryan Harris
> '<>' is magical, it will loop over lines that are passed in, and when > files are supplied on the command line, they are opened and looped > through as well. It's an ever so handy feature. Plus, it's low on > memory. Yes! Thank you Casey, that was exactly what I was looking for! - Bryan

RE: Module to access MS Word files.

2003-02-23 Thread Toby Stuart
> -Original Message- > From: David Gerler [mailto:[EMAIL PROTECTED] > Sent: Monday, February 24, 2003 7:22 AM > To: Beginners > Subject: Module to access MS Word files. > > > I have search cpan for modules to access MS Word files so that I can > parse data from the files. I haven't had

Re: Adding '#' at the beginning of a file

2003-02-23 Thread John W. Krahn
Chern Jian Leaw wrote: > > Hi, Hello, > I'm trying to add the symbol '#' in the /etc/services file for disabling the > following services: > ftp > chargen > daytime Please get a book on Unix systems administration because removing entries from /etc/services will not effect whether services will

script for deleting server log files

2003-02-23 Thread Ronen Kfir
Hi, I have log files on an IIS web server (WIN2K), that I want to delete after a couple of days, lets say -14. I want the script to run under a schedule, and delete those files. Please help! Thanx Ronen

Module to access MS Word files.

2003-02-23 Thread David Gerler
I have search cpan for modules to access MS Word files so that I can parse data from the files. I haven't had much luck in narrowing down the returned hits. Can anyone direct me to a module that I could use? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Coprocessor while running perl 5.4 (dos version)

2003-02-23 Thread Jenda Krynicky
From: "N. Ganesh Babu" <[EMAIL PROTECTED]> > perl -v > > the same message got printed which I have given earlier. I see. Perl doesn't get far enough to tell you what version it is. > The CPU is 386 I'm afraid you are out of luck. Upgrade your computer. Jenda = [EMAIL PROTECTED] === http:/

Re: Adding '#' at the beginning of a file

2003-02-23 Thread ktb
On Sun, Feb 23, 2003 at 11:36:38PM +0800, Leaw, Chern Jian wrote: > Hi, > > I'm trying to add the symbol '#' in the /etc/services file for disabling the > following services: > ftp > chargen > daytime > > I've placed the name of the services i.e ftp, chargen, daytime into a text > file to be read

blind spot with `eval'

2003-02-23 Thread Harry Putnam
My feeble reading of `perldoc -f eval' seems to indicate that both of the below uses should produce the same thing. They don't and I'm having trouble understanding why. cat one.pl #!/usr/local/bin/perl -wp BEGIN { our($in,$out,$arg) = (shift,shift) } eval "s/$in/$out/"; -- Usage resu

Re: Adding '#' at the beginning of a file

2003-02-23 Thread R. Joseph Newton
"Leaw, Chern Jian" wrote: > open(INPUT, "$inputFile"); > close(INPUT); > ... > open(SERVICES, "$servicesFile"); > close(SERVICES); What are you doing here? Rather, what do you think you are doing here? What you are doing is nothing. Think about it this way. You are outside your house, and

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread R. Joseph Newton
Sorry--my earlier response went out just as I noticed that it was incomplete. The changes below should do it. Joseph Chris Knipe wrote: > Lo all, > > I'm doing something *really* stupid... Please kick me... > > while (<>) { > if ($_ =~ /LinkArea="MoreHeadlines">/) { > ($URL = $_) =~

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread R. Joseph Newton
Hi Chris, Try the chage shown inline Joseph Chris Knipe wrote: > Lo all, > > I'm doing something *really* stupid... Please kick me... > > while (<>) { > if ($_ =~ /LinkArea="MoreHeadlines">/) { > ($URL = $_) =~ s/href=\"(.*?)\"/; > print "$URL\n"; > } > } > > I have a URL...

RE: Out of memory while finding duplicate rows

2003-02-23 Thread Beau E. Cox
Thanks Peter - good point > -Original Message- > From: Peter Scott [mailto:[EMAIL PROTECTED] > Sent: Sunday, February 23, 2003 5:17 AM > To: [EMAIL PROTECTED] > Subject: RE: Out of memory while finding duplicate rows > > > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Beau E. Cox

Adding '#' at the beginning of a file

2003-02-23 Thread Leaw, Chern Jian
Hi, I'm trying to add the symbol '#' in the /etc/services file for disabling the following services: ftp chargen daytime I've placed the name of the services i.e ftp, chargen, daytime into a text file to be read by the script. This is because there are many other services to be disabled from the

RE: Out of memory while finding duplicate rows

2003-02-23 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Beau E. Cox) writes: >Hi - > >Wait! If you are going to load the data into a database anyway, >why not use the existing database (or the one being created) to >remove duplicates. You don't even have to have an index on the >column you are making u

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Chris Knipe
> > try: ($URL) = /href="(.*?)"/; > Not sure what I did the first time... But it works the second time... while (<>) { if (($_ =~ /^/i)) { ($URL) = /href="(.*?)"/; print "$URL\n"; } } Thanks Stefan... Much appreciated. -- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Stefan Lidman
John Baker wrote: > > To match one href key/value pairs per line: > > while (<>) { > if (/LinkArea=\"MoreHeadlines\"\>/) { > print "$1\n", if (/href\=\"(\w+)\"\s/); \w is [a-zA-Z_0-9] but respects use locale, and will not match if there is a : or / or . between the "" /Stefan >

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Chris Knipe
- Original Message - From: "Stefan Lidman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 23, 2003 3:17 PM Subject: Re: Stupid regex.. I'm going to kick myself... > > while (<>) { > > if ($_ =~ /LinkArea="MoreHeadlines">/) { > > ($URL) = $_ =~ /href="($.)"/;

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread John Baker
To match one href key/value pairs per line: while (<>) { if (/LinkArea=\"MoreHeadlines\"\>/) { print "$1\n", if (/href\=\"(\w+)\"\s/); } } ...though this does assume that you'd only have one href key and value per line after the "MoreHeadlines" match. If it's possible to have mult

Re: Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Stefan Lidman
Chris Knipe wrote: > > Lo all, > > I'm doing something *really* stupid... Please kick me... > > while (<>) { > if ($_ =~ /LinkArea="MoreHeadlines">/) { > ($URL) = $_ =~ /href="($.)"/; > print "$URL\n"; > } > } > > I have a URL... > > LinkArea="MoreHeadlines">test > > Ever

Stupid regex.. I'm going to kick myself...

2003-02-23 Thread Chris Knipe
Lo all, I'm doing something *really* stupid... Please kick me... while (<>) { if ($_ =~ /LinkArea="MoreHeadlines">/) { ($URL) = $_ =~ /href="($.)"/; print "$URL\n"; } } I have a URL... test Everything is randomly generated. Hence, I want to extract anything specified in the

RE: Array Object in an instance variable

2003-02-23 Thread Beau E. Cox
Hi - > -Original Message- > From: Olivier Wirz [mailto:[EMAIL PROTECTED] > Sent: Sunday, February 23, 2003 12:26 AM > To: [EMAIL PROTECTED] > Subject: Array Object in an instance variable > > > Hello, > > In the _init method of my class, I have something like that: > > sub _init > { >m

RE: bitwise?

2003-02-23 Thread Beau E. Cox
Hi - > -Original Message- > From: jdavis [mailto:[EMAIL PROTECTED] > Sent: Saturday, February 22, 2003 11:52 PM > To: perl > Subject: bitwise? > > > Hello, > Could someone explain what bitwise means? I am reading > up on Perl operators and I am seeing the term bitwise used for > the &

Array Object in an instance variable

2003-02-23 Thread Olivier Wirz
Hello, In the _init method of my class, I have something like that: sub _init { my ($self, %parameters) = @_; $self -> Classes::_MyClass::_init(%parameters); $self -> {_definitions} = ( { IN => "file1.txt", OUT=> "file1.dat", } );

bitwise?

2003-02-23 Thread jdavis
Hello, Could someone explain what bitwise means? I am reading up on Perl operators and I am seeing the term bitwise used for the & and | operators. better yet could i get a little code with a example of bitwise operators that a newbie could assimilate. Thanks, -- jd [EMAIL PROTECTED] Bad spell

RE: Out of memory while finding duplicate rows

2003-02-23 Thread Beau E. Cox
Hi - Wait! If you are going to load the data into a database anyway, why not use the existing database (or the one being created) to remove duplicates. You don't even have to have an index on the column you are making unique (but it would be _much_ faster). Just select on you key, and, if found, r