RE: Calling functions using variable (I mean symbolic refs)

2004-11-25 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : Some one please do help me : : I'm sure that there could be better solution and I'm : sure that someone would have faced a similar situation. : : Do let me know your best possible solution for this : scenario. Show me the entire script or a

Re: Perl cant add up with sprintf ?

2004-11-25 Thread Oliver Schnarchendorf
On Fri, 26 Nov 2004 17:47:25 +1100, David Clarke wrote: > As well, if the large number starts with 0, I get an "Illegal octal > digit '8' at test.pl line 2, at end of line". Sorry, forgot this one. A number can't start with a zero (except if it is in front of a comma). If a number starts with a z

RE: Calling functions using variable (I mean symbolic refs)

2004-11-25 Thread kamal.gupta
Some one please do help me I'm sure that there could be better solution and I'm sure that someone would have faced a similar situation. Do let me know your best possible solution for this scenario. >Subject: Calling functions using variable (I mean symbolic refs) > > > >Hi all, > > >May be

Re: Perl cant add up with sprintf ?

2004-11-25 Thread Oliver Schnarchendorf
On Fri, 26 Nov 2004 17:47:25 +1100, David Clarke wrote: > my $amount1 = 14313562897; > my $amount2 = 0013625; > $amount = sprintf("%011d", $amount1 + $amount2); > print $amount."\n"; > > The answer perl gives me is -01 > How can this be ? > > As well, if the large number starts with 0

Re: Perl cant add up with sprintf ?

2004-11-25 Thread Edward WIJAYA
Hi Dave, my $amount2 = 0013625; As you pointed already. 0 is an octal constant $amount = sprintf("%011d", $amount1 + $amount2); and: printf "%d" casts to a signed int unfortunately the printf interface doesn't give a good way to say "deal with this number, whether perl stored it as si

Perl cant add up with sprintf ?

2004-11-25 Thread David Clarke
I have an 11 digit number. I want to add another number to it and format to 11 digits as well. my $amount1 = 14313562897; my $amount2 = 0013625; $amount = sprintf("%011d", $amount1 + $amount2); print $amount."\n"; The answer perl gives me is -01 How can this be ? As well, if th

Re: A force switch with MCPAN install

2004-11-25 Thread John Pretti
- Original Message - From: "Michael David" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 25, 2004 10:41 PM Subject: A force switch with MCPAN install Hello, I am trying to install the DBD::mysql package, but I am having some issues with the make test and make insta

A force switch with MCPAN install

2004-11-25 Thread Michael David
Hello, I am trying to install the DBD::mysql package, but I am having some issues with the make test and make install, causing the whole process to fail. Can anyone give some advice on forcing the install... but, if possible, I would still like to have control of dependancies, just have it push

Re: Overridden methods

2004-11-25 Thread Bob Showalter
Bob Showalter wrote: Michael Kraus wrote: > "A class that cannot have direct instances. The opposite of an > abstract class is a concrete class." Your class is not an abstract class in this sense, as you can instantiate objects of the class. This is the meaning that I have always used (coming from

Re: Overridden methods

2004-11-25 Thread Bob Showalter
Michael Kraus wrote: G'day... Firstly ***thanks*** to everyone who has been helping me with this Really appreciated... Now, for friendly arguments sake... > > I'm wanting to write a method in an abstract class that must be > > overriden by it's children. If it is called directly (i.e. without >

RE: Spam:Re: Search and substutiing text and adding in a carriage return?

2004-11-25 Thread Michael Kraus
G'day... > s/ MATCH / MATCH NEW /; > > Which should output: > > MATCH NEW. > > The "//" don't work. I'm sure my syntax is wrong. > > s/ MATCH / MATCH ///NEW /; > > Output I require: > > MATCH > NEW s/MATCH/MATCH\nNEW/g; Will replace all instances of MATCH with: MATCH NEW You may also wis

Re: open and ń

2004-11-25 Thread Jenda Krynicky
From: ruben <[EMAIL PROTECTED]> > I'm making an gui for a program and therefor I use the > > open(OPEN, 'command'); > while (){ > ... > } > > In my arguments I need to use an ń. When I execute this command > through perl it changes this character in a 3 other ones, and of > course that generat

open and ñ

2004-11-25 Thread ruben
Hi everyone I'm making an gui for a program and therefor I use the open(OPEN, 'command'); while (){ ... } In my arguments I need to use an ñ. When I execute this command through perl it changes this character in a 3 other ones, and of course that generates errors. But when I type my command i

Calling functions using variable (I mean symbolic refs)

2004-11-25 Thread kamal.gupta
Hi all, May be this is a OLD topic of discussion. I have a Perl script with lot of functions. This Perl script accepts two command line options (string values) where the concatenation of these two strings will give me the function name. All the functions in this Perl script are like this. For

Re: Using built in Grep

2004-11-25 Thread Chance Ervin
- Original Message - From: "FlashMX" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 25, 2004 8:31 AM Subject: re: Using built in Grep > > I need to search for a certain string in a datafile and execute some other code if a match is found. > > Do I have to read in the

RE: Using built in Grep

2004-11-25 Thread Charles K. Clarkson
FlashMX <[EMAIL PROTECTED]> wrote: : I need to search for a certain string in a datafile and : execute some other code if a match is found. : : Do I have to read in the file before I can perform a grep? Yes. : I thought the grep works like it would from a command line? : grep "string to se

re: Using built in Grep

2004-11-25 Thread FlashMX
I need to search for a certain string in a datafile and execute some other code if a match is found. Do I have to read in the file before I can perform a grep? I thought the grep works like it would from a command line? grep "string to search" -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: 2 B::Bytecode modules?

2004-11-25 Thread JupiterHost.Net
JupiterHost.Net wrote: Hello group, In my meandering with Perl's guts via the B modules I've com across these three B::Bytecode module docs: http://www.xav.com/perl/lib/B/Bytecode.html http://rootr.net/man/man/B::Bytecode/3p http://search.cpan.org/~nwclark/perl-5.8.5/ext/B/B/Bytecode.pm Besid

2 B::Bytecode modules?

2004-11-25 Thread JupiterHost.Net
Hello group, In my meandering with Perl's guts via the B modules I've com across these three B::Bytecode module docs: http://www.xav.com/perl/lib/B/Bytecode.html http://rootr.net/man/man/B::Bytecode/3p http://search.cpan.org/~nwclark/perl-5.8.5/ext/B/B/Bytecode.pm Besides the options being dif

Re: Debug a form that requires input variables

2004-11-25 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Sorry I've login script that I'm trying to debug. User type in user id password. I'm getting the premature end of script headers. Therefore, I need to find why and where this is happing. Dan Please don't top post :) You can use perl's debugger or: use strict use warni

Re: Debug a form that requires input variables

2004-11-25 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Sorry I've login script that I'm trying to debug. User type in user id password. I'm getting the premature end of script headers. Therefore, I need to find why and where this is happing. Dan Please don't top post, reply inline :) You can use perl's debugger or: use str

Re: Debug a form that requires input variables

2004-11-25 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Sorry I've login script that I'm trying to debug. User type in user id password. I'm getting the premature end of script headers. Therefore, I need to find why and where this is happing. Dan Please don't top post :) You can use perl's debugger or: use strict use warni

Re: Search and substutiing text and adding in a carriage return?

2004-11-25 Thread FlashMX
Nevermind...got it. On Thu, 25 Nov 2004 09:30:39 -0500, FlashMX wrote: >On Thu, 25 Nov 2004 15:16:32 +0100, Gunnar Hjalmarsson wrote: > >>FlashMX wrote: >>> How can I enter in a carriage return when doing a text substitution? >> >>Suppose you mean a newline... > >Yes. > >>The right side of the

Re: Search and substutiing text and adding in a carriage return?

2004-11-25 Thread FlashMX
On Thu, 25 Nov 2004 15:16:32 +0100, Gunnar Hjalmarsson wrote: >FlashMX wrote: >> How can I enter in a carriage return when doing a text substitution? > >Suppose you mean a newline... Yes. >The right side of the s/// operator works as a double-quoted string. >Accordingly, you can do it just like

how to read message using pop3

2004-11-25 Thread vishwas bhakit
hi i am doing for email reading script in perl. i can read message from header using "=~" binding operator. but i don't know how to read message of that mail. can plz anybody help me for this. thnx... Yahoo! India Matrimony: Find your life partneronline.

Re: Search and substutiing text and adding in a carriage return?

2004-11-25 Thread Gunnar Hjalmarsson
FlashMX wrote: How can I enter in a carriage return when doing a text substitution? Suppose you mean a newline... The right side of the s/// operator works as a double-quoted string. Accordingly, you can do it just like you would have added a newline to a double-quoted string. -- Gunnar Hjalmars

Re: how to read message from email in pop3

2004-11-25 Thread Chris Devers
On Thu, 25 Nov 2004, vishwas bhakit wrote: > i am [working on a] email reading script in perl. > i can read message[s] from header using "=~" binding operator. > but i don't know how to read message of that mail. > can [please] anybody help me for this. > > [thanks]... We can only help you if

Re: email reading script

2004-11-25 Thread Chris Devers
On Thu, 25 Nov 2004, vishwas bhakit wrote: > I am working [on a] email reading script in perl, > can anybody [please] tell me where can i get > help for this[question mark] > > [thanks]. This list can help you. Please describe what you need to do -- access a POP account? -- and what code you

Re: Debug a form that requires input variables

2004-11-25 Thread ds10025
Sorry I've login script that I'm trying to debug. User type in user id password. I'm getting the premature end of script headers. Therefore, I need to find why and where this is happing. Dan --On 25 November 2004 08:04 -0600 "JupiterHost.Net" <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote:

Re: How to install LWP.pm module

2004-11-25 Thread Chris Devers
On Thu, 25 Nov 2004, Ramprasad A Padmanabhan wrote: > On Thu, 2004-11-25 at 11:43, Prabahar Mosas wrote: > > > > Dear All, > > > > I am using perl 5.00503. In this perl lot of pm modules > > are missing. I want to add LWP.pm,Warnings.pm in this perl. If > > anybody know regarding t

Re: a question about the return value of a subroutine

2004-11-25 Thread Randy W. Sims
Zeng Nan wrote: Hi, Here is a simple program: 1 my @nums = (1..100); 2 my $result = &total(@nums); 3 4 print "$result\n"; 5 6 sub total { 7 my $sum; 8 foreach(@_){ $sum += $_ } 9 $sum; 10 } My question is without line 9, the return value is nothing, while I expect it will return the value

Re: Debug a form that requires input variables

2004-11-25 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Hi Hello, How best to debug a form that requires user to input data? What do you mean "debug a form"? Do you mean validate wah they enter? With some programming lang it is possible to single step line by line. Is it possible with perl? Yes I imagine its very possible and

Debug a form that requires input variables

2004-11-25 Thread ds10025
Hi How best to debug a form that requires user to input data? With some programming lang it is possible to single step line by line. Is it possible with perl? Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

re: Search and substutiing text and adding in a carriage return?

2004-11-25 Thread FlashMX
Hi, How can I enter in a carriage return when doing a text substitution? while ( ) { if (/FIND_MATCH/) { s/AAA/BBB CCC/; } Input file === 111 222 333 AAA 444 555 666 Output file 111 222 333 BBB CCC 444 555 666 Is it possible to have the output like so (with a carriag

Re: Using grep to check contents of file

2004-11-25 Thread Gunnar Hjalmarsson
[ Please type your reply *below* the part(s) of the message you are commenting on. ] FlashMX wrote: Gunnar Hjalmarsson wrote: FlashMX wrote: Is this correct? What happened when you tried to run it (with strictures and warnings enabled)? I had to disable the warnings because I get an error: Can't l

Re: Using grep to check contents of file

2004-11-25 Thread FlashMX
I had to disable the warnings because I get an error: Can't locate warnings.pm in @INC at test.pl line 3. BEGIN failed--compilation aborted at test.pl line 3. When I disable the warnings my script runs but it doesn't find the match from my grep even thought the text I'm trying to find IS in th

Re: Using grep to check contents of file

2004-11-25 Thread Gunnar Hjalmarsson
FlashMX wrote: Is this correct? What happened when you tried to run it (with strictures and warnings enabled)? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Using grep to check contents of file

2004-11-25 Thread FlashMX
Is this correct? I need to run GREP to check file(s) for some text and if I find a match then execute my code. my $file = 'input.file'; if (grep(/FIND MATCH/i, $file)) { Found a match...run code } else { No match found } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: Overridden methods

2004-11-25 Thread Michael S. E. Kraus
G'day Paul... Nice to see another Evolution user... :) > It's a more advanced question than most, but not inappropriate for this > list, I think. You may also wish to consider comp.lang.perl.misc or > perlmonks for further insight. Thanks for that... :) > But you should also consider that man

Re: a question about the return value of a subroutine

2004-11-25 Thread Ing. Branislav Gerzo
Zeng Nan [ZN], on Thursday, November 25, 2004 at 16:04 (+0800) typed the following: >>6 sub total { >>7 my $sum; >>8 foreach(@_){ $sum += $_ } >>9 $sum; >>10 } ZN> My question is without line 9, the return value is nothing, while I ZN> expect it will return the value of $sum, as it is the l

a question about the return value of a subroutine

2004-11-25 Thread Zeng Nan
Hi, Here is a simple program: >1 my @nums = (1..100); >2 my $result = &total(@nums); >3 >4 print "$result\n"; >5 >6 sub total { >7 my $sum; >8 foreach(@_){ $sum += $_ } >9 $sum; >10 } My question is without line 9, the return value is nothing, while I expect it will return the value of $

how to read message from email in pop3

2004-11-25 Thread vishwas bhakit
hi i am doing for email reading script in perl. i can read message from header using "=~" binding operator. but i don't know how to read message of that mail. can plz anybody help me for this. thnx... Yahoo! India Matrimony: Find your life partneronline.

AW: email reading script

2004-11-25 Thread Bastian Angerstein
try http://www.koders.com they have a lot of code to evaluate. -Ursprüngliche Nachricht- Von: vishwas bhakit [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 25. November 2004 10:19 An: [EMAIL PROTECTED] Betreff: email reading script hello, I am working for email reading script in perl,

email reading script

2004-11-25 Thread vishwas bhakit
hello, I am working for email reading script in perl, can anybody plz tell me where can i get help for this. thnx. Yahoo! India Matrimony: Find your life partneronline.

Re: How to install LWP.pm module

2004-11-25 Thread Ramprasad A Padmanabhan
On Thu, 2004-11-25 at 11:43, Prabahar Mosas wrote: > > Dear All, > > I am using perl 5.00503. In this perl lot of pm modules > are missing. I want to add LWP.pm,Warnings.pm in this perl. If > anybody know regarding this mail me. You will have to upgrade perl to get warnings workin