RE: distributing perl applications

2003-02-03 Thread Beau E. Cox
Hi - > -Original Message- > From: Duarte Cordeiro [mailto:[EMAIL PROTECTED]] > Sent: Sunday, February 02, 2003 8:58 PM > To: [EMAIL PROTECTED] > Subject: distributing perl applications > > > Hi, > > after spending a couple of months on a perl project, I'm going > to install the appli

remote execn on win nt machines for their info

2003-02-03 Thread PRADEEP GOEL
Hi All Does anybody knows how to use perl or other script for remote execn on nt machines to get some info of machines , may be say from registery , etc . Regds Pradeep -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-03 Thread Rob Dixon
Paul Johnson wrote: > It probably sits better with something like: > > $var = 10 unless defined $var; > > But 5.10 will (probably) introducde the // operator which will allow > you to say: > > $var //= 10; Where do you get this insider information Paul? And what's this operator going to do? Pr

Re: Just another regex quetion

2003-02-03 Thread Rob Dixon
Konrad Foerstner wrote: > Hi folks, > > an new question about the mystery of regexs: > > I want to store some parts of a file wich are separetet by "#". Each > each part should become an entry of an array. example: > > " > # foobar > nothing important > nothing interesting > # bar foot > lululul >

Help with fork type of operation.

2003-02-03 Thread Michael Kingsbury
I'm trying to figure out the best way to go about this. I have an operation that takes some time that has to be done to every file. Certain files then go through operation #2, which takes even longer. I want to somehow fork off number two so that operation number one can proceed. Multiple insta

RE: Installing Win32::AdminMisc

2003-02-03 Thread Dave Roth
I needs to be recompiled. We have recompiled it but have a couple of functions that are having problems with 5.8. A fix should be immenent. After we release you will be able to use your PPM repository to install. -Original Message- From: Andrew Gilchrist [mailto:[EMAIL PROTECTED]] Sent: T

Re: Help with fork type of operation.

2003-02-03 Thread Rob Dixon
Michael Kingsbury wrote: > I'm trying to figure out the best way to go about this. I have an > operation that takes some time that has to be done to every file. > Certain files then go through operation #2, which takes even longer. > I want to somehow fork off number two so that operation number o

RE: remote execn on win nt machines for their info

2003-02-03 Thread Kipp, James
> Hi All > > Does anybody knows how to use perl or other script > for remote execn on nt machines to get some info of machines > , may be say > from > registery , etc . > Are you asking howto run commands on a remote NT machine? Your best bet is to use the psexec utililty where you can

please stop sending mails

2003-02-03 Thread Huh, Jung

Re: remote execn on win nt machines for their info

2003-02-03 Thread R. Joseph Newton
PRADEEP GOEL wrote: > Hi All > > Does anybody knows how to use perl or other script > for remote execn on nt machines to get some info of machines , may be say > from > registery , etc . Subject: Re: Installing Win32::AdminMisc Date: Fri, 31 Jan 2003 01:49:23 +0100 Fro

Search Replace

2003-02-03 Thread Paul Kraus
I have an array that I want to remove every instance of '$' and all leading and trailing white space. My code only seems to remove '$'. I know I can split this into separate commands but is there a way to do this all at once? $_=~s/($\s+)||(\s+^)||(\$)//g foreach (@fields); I have also tried $_=~s

Re: Search Replace

2003-02-03 Thread Frank Wiles
.--[ Paul Kraus wrote (2003/02/03 at 10:29:14) ]-- | | I have an array that I want to remove every instance of '$' and all | leading and trailing white space. | My code only seems to remove '$'. I know I can split this into separate | commands but is there a way to do this all at

Re: Can't locate object method "Attach" via package "Mail::Sender"

2003-02-03 Thread Jenda Krynicky
From: david <[EMAIL PROTECTED]> > Dan Muey wrote: > > $sender = new Mail::Sender {smtp => "$smtp_serv", from => "$from"}; > > the above should be: > > $sender = new Mail::Sender({smtp => $smtp_serv, from => $from}); > > you are missing the () No. The () is not necessary there. Both mean exactl

Re: distributing perl applications

2003-02-03 Thread Jenda Krynicky
From: "Duarte Cordeiro" <[EMAIL PROTECTED]> > after spending a couple of months on a perl project, I'm going to > install the application on costumer's server. The question being: > - Is there any way I can "join" all the modules in one big file? It > has nothing to do with do not wanting them to

Re: Search Replace

2003-02-03 Thread Rob Dixon
"Paul Kraus" <[EMAIL PROTECTED]> wrote in message 005b01c2cb99$02315ee0$8afea8c0@pkraus">news:005b01c2cb99$02315ee0$8afea8c0@pkraus... > I have an array that I want to remove every instance of '$' and all > leading and trailing white space. > My code only seems to remove '$'. I know I can split th

RE: Search Replace

2003-02-03 Thread Paul Kraus
Nope I wish. 3 fields. 1 is a part number, 2 is cost, 3 is list. I am removing the '$' for 2 and 3. where as I am removing white space from 1,2,&3. I was just trying to do it all in one statement. Frank Wiles solution worked perfectly. s/(?:^\s+|\$+|\s+$)//g Paul -Original Message- From:

Re: Use of uninitialized value in pattern match (m//) at test.pl line 85.

2003-02-03 Thread Paul Johnson
On Mon, Feb 03, 2003 at 11:08:37AM -, Rob Dixon wrote: > Paul Johnson wrote: > > But 5.10 will (probably) introducde the // operator which will allow > > you to say: > > > > $var //= 10; > > Where do you get this insider information Paul? Keeping up with development :-) >

Re: file's MIME type

2003-02-03 Thread mario kulka
mario kulka wrote: I found the following in a book when trying to find out the file's MIME type, but it doesn't work. Am I missing something obvious? Thanks. M. code: #!/usr/bin/perl -W use CGI ':standard'; $file = param('music_file'); $info = uploadInfo ($file); $type = $info -> {'Content-Type

Re: file's MIME type

2003-02-03 Thread wiggins
On Mon, 03 Feb 2003 17:07:43 +, "mario kulka" <[EMAIL PROTECTED]> wrote: > >mario kulka wrote: > >>I found the following in a book when trying to find out the file's MIME > >>type, but it doesn't work. Am I missing something obvious? Thanks. M

Ref - Hash of Arrays

2003-02-03 Thread Paul Kraus
I have a hash of arrays. Here is a sample of one of the elements $hoa{key}=[2,somestring,someotherstring]; If I where to print it like this print "$#{hoa{key}}" It print 2. >From how I understand this $# is dereferencing and should print what ever is contained. In a hash of arrays does

RE: Ref - Hash of Arrays

2003-02-03 Thread Mark Anderson
>I have a hash of arrays. Here is a sample of one of the elements > >$hoa{key}=[2,somestring,someotherstring]; > >If I where to print it like this > print "$#{hoa{key}}" >It print 2. I'm pretty sure this isn't your actual code. >From how I understand this $# is dereferencing and should pr

RE: Ref - Hash of Arrays

2003-02-03 Thread Bob Showalter
Paul Kraus wrote: > I have a hash of arrays. Here is a sample of one of the elements > > $hoa{key}=[2,somestring,someotherstring]; > > If I where to print it like this > print "$#{hoa{key}}" This is invalid syntax. It needs to be $#{$hoa{key}} > It print 2. > > From how I understand thi

RE: Can't locate object method "Attach" via package "Mail::Sender"

2003-02-03 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > > From: "Dan Muey" <[EMAIL PROTECTED]> > > > > I'm getting this error from Mial::Sender and am not sure why. > > > > Can't locate object method "Attach" via package "Mail::Sender" > > > > What version of Mail::Sender do you have? Is there any c

RE: Warnings.pm for pre 5.8.0 perl

2003-02-03 Thread Dan Muey
> > I have installed a newer version of Mail::Sender and now > that won't run because it needs to > use warnings; > > I can't seem to get warnings installed via CPAN Module and I > can't find a download for it on cpan. > > On cpan it's under the perl 5.8.0 section so does that mean I > ne

Sorting Hash of arrays by how many elements

2003-02-03 Thread Paul Kraus
This is straight from the camel pg 277. Unless I misunderstand this then the items with 3 elements should be at the top not in the middle. What am I doing wrong? Can someone break down what the sort statement in this situation is doing. References are still confusing the hell out of me. My code

Re: Search Replace

2003-02-03 Thread Rob Dixon
"Paul Kraus" <[EMAIL PROTECTED]> wrote in message 007001c2cba0$2a952ae0$8afea8c0@pkraus">news:007001c2cba0$2a952ae0$8afea8c0@pkraus... > Nope I wish. > > 3 fields. 1 is a part number, 2 is cost, 3 is list. > I am removing the '$' for 2 and 3. where as I am removing white space > from 1,2,&3. > I w

Re: how to distribute a module

2003-02-03 Thread Paul Tremblay
On Sun, Feb 02, 2003 at 10:10:02PM -0800, Randal L. Schwartz wrote: > > > "rtf" is a Really Bad Name for a module. > > First, it starts with a lowercase letter, which is reserved > for system packages and modules. Not You. > > Second, if you ever plan on distributing it outside your local gro

Regex & threads

2003-02-03 Thread dan
Hey, I posted a while ago on a thread marked "More regex reguired!", the solution gave there did part of the job I asked. I need something more out of that regex though.. 1) this.is.a.string.to.match.with 2) this.is.another.string.to.match.with 3) this.is.a.totally.with.different.string What I wa

RE: Can't locate object method "Attach" via package "Mail::Sender"

2003-02-03 Thread Dan Muey
> > From: "Dan Muey" <[EMAIL PROTECTED]> > > > I'm getting this error from Mial::Sender and am not sure why. > > > Can't locate object method "Attach" via package "Mail::Sender" > > What version of Mail::Sender do you have? Is there any chance you > have two different version

Warnings.pm for pre 5.8.0 perl

2003-02-03 Thread Dan Muey
I have installed a newer version of Mail::Sender and now that won't run because it needs to use warnings; I can't seem to get warnings installed via CPAN Module and I can't find a download for it on cpan. On cpan it's under the perl 5.8.0 section so does that mean I need to upgrade perl? Is

RE: Regex & threads

2003-02-03 Thread Dan Muey
> > Hey, I posted a while ago on a thread marked "More regex > reguired!", the solution gave there did part of the job I > asked. I need something more out of that regex though.. > > 1) this.is.a.string.to.match.with > 2) this.is.another.string.to.match.with > 3) this.is.a.totally.with.differ

Re: Sorting Hash of arrays by how many elements

2003-02-03 Thread Wiggins d'Anconia
See inline. Paul Kraus wrote: This is straight from the camel pg 277. Unless I misunderstand this then the items with 3 elements should be at the top not in the middle. What am I doing wrong? Can someone break down what the sort statement in this situation is doing. References are still confusi

Re: Sorting Hash of arrays by how many elements

2003-02-03 Thread Jenda Krynicky
From: "Paul Kraus" <[EMAIL PROTECTED]> > This is straight from the camel pg 277. > Unless I misunderstand this then the items with 3 elements should be > at the top not in the middle. What am I doing wrong? > > Can someone break down what the sort statement in this situation is > doing. Referenc

RE: Warnings.pm for pre 5.8.0 perl

2003-02-03 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]> > > I have installed a newer version of Mail::Sender and now > > that won't run because it needs to > > use warnings; > > > > I can't seem to get warnings installed via CPAN Module and I > > can't find a download for it on cpan. > > > > On cpan it's under

mysql and mail

2003-02-03 Thread Susanne & Martin
Hi, I think i'm really a newbie, but i spend days looking for a perl/cgi-script able to work as a cronjob reading my database and sending automaticly generated emails to adresses in the database selected by a query. No problem finding something concerning mailinglists, but all of them work with

Re: Sorting Hash of arrays by how many elements

2003-02-03 Thread Peter Scott
In article <008301c2cbbd$15c27c40$8afea8c0@pkraus>, [EMAIL PROTECTED] (Paul Kraus) writes: >This is straight from the camel pg 277. >Unless I misunderstand this then the items with 3 elements should be at >the top not in the middle. >What am I doing wrong? > >Can someone break down what the sort

Re: Regex & threads

2003-02-03 Thread dan
Maybe I didn't mention, that if I search for *.with, it gives the first 2 results, but if i look for *.with* it returns all 3. But like, a search of *.to doesn't return anything, but a search of *.to* returns the first 2 strings, if you get what I mean? It's like searching for files with the search

Re: Replacing a string in a bunch of files

2003-02-03 Thread Victor Tsang
Mu... I have a quicker way, try this. cat FileContainFileNames | xargs -n1 perl -pe "s/oldstring/newstring/g" -i Tor. Richard Fernandez wrote: > > I just had a situation where I needed to replace one string with another > string in 200 files. > This is what I came up with, but I know there ha

Re: Replacing a string in a bunch of files

2003-02-03 Thread John W. Krahn
Victor Tsang wrote: > > Mu... I have a quicker way, try this. > > cat FileContainFileNames | xargs -n1 perl -pe "s/oldstring/newstring/g" > -i Another nomination for a UUOC award. :-) xargs -n1 < FileContainFileNames | perl -i -pe "s/oldstring/newstring/g" John -- use Perl; program fulfillm

extracting field and getting sum

2003-02-03 Thread Eri Mendz
hello everyone, since im learning perl, i might as well harness its power to solve my small real-world problem. sample lines of my grep'ped ppp log goes like this: Jan 12 05:47:50 localhost pppd[8696]: Connect time 2.2 minutes. Jan 12 19:23:44 localhost pppd[9359]: Connect time 34.0 minutes. [..]

Re: extracting field and getting sum

2003-02-03 Thread Wiggins d'Anconia
Eri Mendz wrote: hello everyone, this just prints the time field on each line until finish of loop. i tried using += operator to get sum but i end up getting errors. how do i do this? i checked my script with perl's -c flag and it says syntax OK but i get errors when i run the script in command

Re: extracting field and getting sum

2003-02-03 Thread R. Joseph Newton
Eri Mendz wrote: > Use of uninitialized value in concatenation (.) or string at ./diamond-optr.pl line >15, <> line 20. > Use of uninitialized value in concatenation (.) or string at ./diamond-optr.pl line >15, <> line 21. > Use of uninitialized value in concatenation (.) or string at ./diamond