Sourcing Configuration files

2004-11-02 Thread Gavin Henry
Hi all, What is the easiest way to move variable declarations out into a file in /etc/ and requiring a perl program to read them in at startup. If they are not there, then the program must complain. Thanks. P.S> I can't seem to find it in my O'reilly books. -- Just getting into the best langua

extract anything between escape characters

2004-11-02 Thread Khairul Azmi
Hi, I am newbies in this regex world. I just want to extract the character double quotes at the beginning and the ending of a string. $string1 = "this is the string"; so that $string1 would be 'this is the string' without the double quotes. Thanks Azmi -- To unsubscribe, e-mail: [EMAIL PROTECT

Re: extract anything between escape characters

2004-11-02 Thread Ing. Branislav Gerzo
Khairul Azmi [KA], on Tuesday, November 2, 2004 at 16:43 (+0800) contributed this to our collective wisdom: KA> I am newbies in this regex world. I just want to extract the character KA> double quotes at the beginning and the ending of a string. KA> $string1 = "this is the string"; KA> so that $s

Re: extract anything between escape characters

2004-11-02 Thread Khairul Azmi
Thanks. But It does not display the output that I need. $string1="\"email title\""; $string2='email title'; $string1 =~ /.*/; print "s1 = $string1 \n"; print "s2 = $string2 \n"; Should s1 = s2? On Tue, 2 Nov 2004 10:05:39 +0100, Ing. Branislav Gerzo <[EMAIL PROTECTED]> wrote: > Khairul Azmi [

character functions

2004-11-02 Thread Anish Kumar K.
Hi How will I get the character by character(just like getchar in C) wit PERL In this program... open IN,"D:/test.txt"; @file=; print "file is $file[0]"; This will print the first line of the txt file...I wanted to get character by character... How will I get it. Please help Thanks AK

Re: extract anything between escape characters

2004-11-02 Thread Ing. Branislav Gerzo
Khairul Azmi [KA], on Tuesday, November 2, 2004 at 17:15 (+0800) wrote: KA> $string1="\"email title\""; KA> $string2='email title'; if you want string2 equal to string1, you have to remove double quotes. So, you should try: $string1="\"email title\""; $string2='email title'; $string1 =~ s/\"//

Re: Sourcing Configuration files

2004-11-02 Thread Ramprasad A Padmanabhan
On Tue, 2004-11-02 at 13:41, Gavin Henry wrote: > Hi all, > > What is the easiest way to move variable declarations out into a file in > /etc/ and requiring a perl program to read them in at startup. If they are > not there, then the program must complain. > > Thanks. > You cannot source shell

Re: extract anything between escape characters

2004-11-02 Thread Khairul Azmi
The problem is I would not any double quote in the middle of the sentence to be removed. For example $string="\" email title. \" username \""; On Tue, 2 Nov 2004 10:31:22 +0100, Ing. Branislav Gerzo <[EMAIL PROTECTED]> wrote: > Khairul Azmi [KA], on Tuesday, November 2, 2004 at 17:15 (+0800) > w

Re: Sourcing Configuration files

2004-11-02 Thread Gavin Henry
Ramprasad A Padmanabhan said: > On Tue, 2004-11-02 at 13:41, Gavin Henry wrote: >> Hi all, >> >> What is the easiest way to move variable declarations out into a file in >> /etc/ and requiring a perl program to read them in at startup. If they >> are >> not there, then the program must complain.

Re: extract anything between escape characters

2004-11-02 Thread Ing. Branislav Gerzo
Khairul Azmi [KA], on Tuesday, November 2, 2004 at 17:52 (+0800) typed: KA> The problem is I would not any double quote in the middle of the KA> sentence to be removed. KA> For example KA> $string="\" email title. \" username \""; you have to be more specific, what do you want. If the sentence

Re: extract anything between escape characters

2004-11-02 Thread Khairul Azmi
Thanks. I'll keep it in mind next time. Still struggling with my English though. On Tue, 2 Nov 2004 11:01:43 +0100, Ing. Branislav Gerzo <[EMAIL PROTECTED]> wrote: > Khairul Azmi [KA], on Tuesday, November 2, 2004 at 17:52 (+0800) > typed: > > KA> The problem is I would not any double quote in t

RE : Sourcing Configuration files

2004-11-02 Thread Jose Nyimi
> -Message d'origine- > De : Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED] > Envoyé : mardi 2 novembre 2004 09:44 > À : Gavin Henry > Cc : perl beginners > Objet : Re: Sourcing Configuration files > > On Tue, 2004-11-02 at 13:41, Gavin Henry wrote: > > Hi all, > > > > What is the eas

Re: Get all mail addresses from a domain

2004-11-02 Thread Eva Perales Laguna
On Sun, Oct 31, 2004 at 03:23:37PM -, Peter Scott wrote: > > The only people who can tell you that are the administrators > of the mail servers and relays for that domain. Why don't > you ask them to provide you with such a list? > Yes, I sopose this is the best solution. Ok, I'll try this

How to find if the script is running on a 32-bit machine

2004-11-02 Thread Ramprasad A Padmanabhan
In a particular script , that is used on multiple unix platforms, I need to know if my perl script is being run on a 32 bit machine or a 64 bit machine Is there any way I can find this portably Thanks Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

Re: Extracting Directories and Sub Directories and Counting

2004-11-02 Thread Gunnar Hjalmarsson
Ron Smith wrote: If I wanted to add more fields to my output, which construct would I use to create more fields; something like the following? basenamecountextensionsize ...maybe 'HoH', or just expand on the 'HoA? I suppose that you are not really talking about the output now, but rathe

Re: character functions

2004-11-02 Thread John W. Krahn
Anish Kumar K. wrote: Hi Hello, How will I get the character by character(just like getchar in C) wit PERL In this program... open IN,"D:/test.txt"; @file=; print "file is $file[0]"; This will print the first line of the txt file...I wanted to get character by character... How will I get it. Plea

XML ::SIMPLE

2004-11-02 Thread E.Horn
Hey! Does the XML SIMPLE Modul work if i only want to get the content of the text between the tags? I want to parse this xmlfile so that there is just CHINA,Hallo,27832 Or do i have to use the Modul XML parser? china Hallo PubMed

Creating Microsoft Word Document with Perl

2004-11-02 Thread Rok Jaklic
Hi. Is there any way to create Microsoft Word Document (.doc) with Perl; without installed Microsoft Word and Win32::OLE? Best regards, Rok -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Extracting Directories and Sub Directories and Counting

2004-11-02 Thread Gunnar Hjalmarsson
Ron Smith wrote: If I wanted to add more fields to my output, which construct would I use to create more fields; something like the following? basenamecountextensionsize ...maybe 'HoH', or just expand on the 'HoA? You multi-posted basically the same question to comp.lang.perl.misc (see

Re: Creating Microsoft Word Document with Perl

2004-11-02 Thread Gary Stainburn
On Tuesday 02 November 2004 12:28 pm, Rok Jaklic wrote: > Hi. > > Is there any way to create Microsoft Word Document (.doc) with Perl; > without installed Microsoft Word and Win32::OLE? > > Best regards, > > Rok Hi Rok. Not a direct answer to your question, but. Does it need to be a .doc? W

RE: XML ::SIMPLE

2004-11-02 Thread Bob Showalter
E.Horn wrote: > Hey! Back for another bite at this apple I see... > Does the XML SIMPLE Modul work if i only want to get the content of > the text between the tags? Of course. Have you tried it? > I want to parse this xmlfile so that there is just CHINA,Hallo,27832 OK. > Or do i have to use t

re xml::simple

2004-11-02 Thread E.Horn
thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Creating Microsoft Word Document with Perl

2004-11-02 Thread Jenda Krynicky
From: Gary Stainburn <[EMAIL PROTECTED]> > On Tuesday 02 November 2004 12:28 pm, Rok Jaklic wrote: > > Hi. > > > > Is there any way to create Microsoft Word Document (.doc) with Perl; > > without installed Microsoft Word and Win32::OLE? > > > > Best regards, > > > > Rok > > Hi Rok. > > Not a direc

porting perl

2004-11-02 Thread bertold
hi i have to start porting project of Perl interpreter for linux-like platform. Perl-5.8.5 cross compile on host RH9 i have cross compiler but it can't compile amd link in one line, like gcc. how to change perl configuration to do it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Chasecreek Systemhouse
On Tue, 02 Nov 2004 16:28:50 +0530, Ramprasad A Padmanabhan <[EMAIL PROTECTED]> wrote: > Is there any way I can find this portably C code should be able to tell (Solaris example) #include #include #include static char chararray[] = "abcdefghijklmnopqrstuvwxyz"; static char *myfunc(int i) {

RE: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Bob Showalter
Ramprasad A Padmanabhan wrote: > In a particular script , that is used on multiple unix platforms, I > need to know if my perl script is being run on a 32 bit machine or a > 64 bit machine Why? > > Is there any way I can find this portably This is just a guess, but would the Config parameter 'a

RE: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Murphy, Ged (Bolton)
Ramprasad A Padmanabhan wrote: > In a particular script , that is used on multiple unix platforms, I > need to know if my perl script is being run on a 32 bit machine or a > 64 bit machine > > Is there any way I can find this portably Can you not just run uname? $SystInfo = `uname -a`

Re: Sourcing Configuration files

2004-11-02 Thread Wiggins d Anconia
> Ramprasad A Padmanabhan said: > > On Tue, 2004-11-02 at 13:41, Gavin Henry wrote: > >> Hi all, > >> > >> What is the easiest way to move variable declarations out into a file in > >> /etc/ and requiring a perl program to read them in at startup. If they > >> are > >> not there, then the program m

Re: extract anything between escape characters

2004-11-02 Thread Melis Mutlu
--- Khairul Azmi <[EMAIL PROTECTED]> wrote: > > KA> The problem is I would not any double quote in > the middle of the > > KA> sentence to be removed. > > KA> For example > > KA> $string="\" email title. \" username \""; Maybe this is what you want: $string =~s/"(.+)"/$1/; Regards Melis

Re: Sourcing Configuration files

2004-11-02 Thread Gavin Henry
Wiggins d Anconia said: >> Ramprasad A Padmanabhan said: >> > On Tue, 2004-11-02 at 13:41, Gavin Henry wrote: >> >> Hi all, >> >> >> >> What is the easiest way to move variable declarations out into a > file in >> >> /etc/ and requiring a perl program to read them in at startup. If >> they >> >>

can we embedd perl script and Html, like we r doing in php

2004-11-02 Thread supriya devburman
hi I am new to perl, i know little bit of PHP ,so can u plz tell me can we embedd perl and html like which we can do in php. And if not how to design page dynamically using html and perl. because as i had observed in books we can not write perl and html on single page. ___

Re: can we embedd perl script and Html, like we r doing in php

2004-11-02 Thread Wiggins d Anconia
> > hi > > I am new to perl, i know little bit of PHP ,so > can u plz tell me can we embedd perl and html like > which we can do in php. And if not how to design page > dynamically using html and perl. because as i had > observed in books we can not write perl and html on > single page. > > I

LWP::Parallel in other way

2004-11-02 Thread Ing. Branislav Gerzo
Hi all, I'm using LWP::Parallel and it works good for me. But I have one curious problem - I want change PUA agent for every request. But I don't know how to to that. Result of this code are 15 txt files, but, content is not what I expect. I'd like to have in TXT something like this: "HTTP_HOST:

RE: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Chris Devers
On Tue, 2 Nov 2004, Murphy, Ged (Bolton) wrote: > Ramprasad A Padmanabhan wrote: > > In a particular script , that is used on multiple unix platforms, I > > need to know if my perl script is being run on a 32 bit machine or a > > 64 bit machine > > > > Is there any way I can find this portably >

RE: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Murphy, Ged (Bolton)
Chris Devers wrote: >> Can you not just run uname? >> >> $SystInfo = `uname -a` > >And then what? > >I'm writing this mail on a Powermac G5 -- nominally a 64-bit machine. > >$ uname -a >Darwin cesar 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 >PDT 2004; root:xnu/xnu-517.7.2

Re: can we embedd perl script and Html, like we r doing in php

2004-11-02 Thread Chris Devers
On Tue, 2 Nov 2004, supriya devburman wrote: > I am new to perl, [I] know little bit of PHP, so > can [you] [please] tell me can we embed perl and html like > which we can do in php[question-mark] And if not how to design page > dynamically using html and perl[question-mark] because as [I] had >

How to enumerate all the nodes on local network to implement Poor Man's Cluster/Load Balancer

2004-11-02 Thread Siegfried Heintze
My client has a windows application called COPIA that waits for a Microsoft word file to appear in a special input directory and coverts the document to a TIFF file in the output directory. There is a perl script (called take_this.pl running on another separate windows box) that accepts Microso

Re: How to find if the script is running on a 32-bit machine

2004-11-02 Thread Chasecreek Systemhouse
Aside from accessing tera-byte files or data structures the only other reason to have 64-bits is really BIG math =/ Trust me, I fully understand why Operating Systems need to be 64-bits or 128-bits -- However, why worry about 64-bit User-Land applications? I say we can worry about t

Re: can we embedd perl script and Html, like we r doing in php

2004-11-02 Thread Grant
> > I am new to perl, [I] know little bit of PHP, so > > can [you] [please] tell me can we embed perl and html like > > which we can do in php[question-mark] And if not how to design page > > dynamically using html and perl[question-mark] because as [I] had > > observed in books we can not write pe

Re: can we embedd perl script and Html, like we r doing in php

2004-11-02 Thread Chris Devers
On Tue, 2 Nov 2004, Grant wrote: > > > I am new to perl, [I] know [a] little bit of PHP, so > > > can [you] [please] tell me can we embed perl and html like > > > which we can do in php[question-mark] And if not how to design page > > > dynamically using html and perl[question-mark] because as [I]

Re: can we embedd perl script and Html, like we r doing in php

2004-11-02 Thread Grant
> > > > I am new to perl, [I] know [a] little bit of PHP, so > > > > can [you] [please] tell me can we embed perl and html like > > > > which we can do in php[question-mark] And if not how to design page > > > > dynamically using html and perl[question-mark] because as [I] had > > > > observed in b

All hosts on an IP ?

2004-11-02 Thread Chasecreek Systemhouse
This is likely a dumb question but I must ask -- I've been playing around DNS and Web bots -- I want to cross match a IP address with all the hosts DNS knows about that IP address -- like even those that are virually hosted named addreses. Am I looking at this wrong or is there something Im missi

Re: Sourcing Configuration files

2004-11-02 Thread Chris Devers
On Tue, 2 Nov 2004, Gavin Henry wrote: > What is the easiest way to move variable declarations out into a file > in /etc/ and requiring a perl program to read them in at startup. If > they are not there, then the program must complain. Have you considered using Tie::File, FreezeThaw or Data::Du

Re: Extracting Directories and Sub Directories and Counting

2004-11-02 Thread Ron Smith
Pardon me Gunnar, etal, I'm new and thought that the 'comp.lang.perl.misc' post was entirely separate from '[EMAIL PROTECTED]', reaching an entirely different audience. I eanestly appologize to everyone on both lists. My bad!! I have spanked my own hand with a digital ruler. I'll do my best no

Re: Extracting Directories and Sub Directories and Counting

2004-11-02 Thread Chris Devers
On Tue, 2 Nov 2004, Ron Smith wrote: > I'm new and thought that the 'comp.lang.perl.misc' post was entirely > separate from '[EMAIL PROTECTED]', reaching an entirely different > audience. I eanestly appologize to everyone on both lists. It's a separate list, but a lot of the same people read bo

Re: Extracting Directories and Sub Directories and Counting

2004-11-02 Thread Gunnar Hjalmarsson
Ron Smith wrote: Gunnar Hjalmarsson wrote: You multi-posted basically the same question to comp.lang.perl.misc (see below). Any comments on that, Ron? Pardon me Gunnar, etal, I'm new and thought that the 'comp.lang.perl.misc' post was entirely separate from '[EMAIL PROTECTED]', reaching an entirely

Re: Extracting Directories and Sub Directories and Counting

2004-11-02 Thread Gunnar Hjalmarsson
Ron Smith wrote: Gunnar Hjalmarsson wrote: You multi-posted basically the same question to comp.lang.perl.misc (see below). Any comments on that, Ron? Pardon me Gunnar, etal, I'm new and thought that the 'comp.lang.perl.misc' post was entirely separate from '[EMAIL PROTECTED]', reaching an entirely

Best FREE Perl installation for Windows??

2004-11-02 Thread Lone Wolf
I need to get back to an installed Windows Perl environment. What's the best free option available out there, that everyone would recommend? I can do installs without too much issues, so installer doesn't matter, but ease of use does. Thanks, Robert --- Outgoing mail is certified Virus Free. Ch

Re: Best FREE Perl installation for Windows??

2004-11-02 Thread Chris Devers
On Tue, 2 Nov 2004, Lone Wolf wrote: > I need to get back to an installed Windows Perl environment. What's > the best free option available out there, that everyone would > recommend? I can do installs without too much issues, so installer > doesn't matter, but ease of use does. Cygwin and A

Re: Best FREE Perl installation for Windows??

2004-11-02 Thread Chasecreek Systemhouse
On Tue, 2 Nov 2004 21:51:48 -0500 (EST), Chris Devers <[EMAIL PROTECTED]> wrote: > The Cygwin one is arguably more similar to Unix versions of Perl, in > that it runs in Cygwin's Unix emulation environment. > > The ActiveState version may arguably be better integrated with Windows, > and I think i