RE: I need help here

2005-10-14 Thread Sreedhar reddy
Thanks a Lot John... I appreciate your feedback which helps me to improve myself... Cheers. Sridhar Reddy -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Saturday, October 15, 2005 11:05 AM To: Perl Beginners Subject: Re: I need help here Sreedhar reddy wrote: >

Re: I need help here

2005-10-14 Thread John W. Krahn
Sreedhar reddy wrote: > Finally I finished this program like this... You should have these two lines at the beginning of your program: use warnings; use strict; as they will help you find some mistakes and enforce better coding practices. > $inputfile= shift; > $outputfile = shift; > ope

Re: Repetead values

2005-10-14 Thread John W. Krahn
Rafael Morales wrote: > Yes it works but I also need to print the files with values with > '0', and your code just prints the files that have values different > of '0', for example when I use your code I got this: > > 2005-09-19 - NA - 56 - 788 > 2005-09-19 - NA - 43 - 540 > 2005-09-19 - NE - 10 -

RE: I need help here

2005-10-14 Thread Charles K. Clarkson
Sreedhar reddy wrote: : Finally I finished this program like this... [snip] A working perl script should not be your only concern when just learning the language. It is equally, no, more important that you learn how to write your code well. Show us your entire worki

RE: I need help here

2005-10-14 Thread Sreedhar reddy
Finally I finished this program like this... $inputfile= shift; $outputfile = shift; open(FILE1,"<$inputfile"); @lines=; close(FILE1); open(FILE2,">$outputfile"); foreach $line (@lines) { if($line =~ m/(\d+) ([a-z,A-Z,_,0-9]+)/) /* to write

RE: I need help here

2005-10-14 Thread Sreedhar reddy
> INPUT = fopen("filename"); > OUTPUT -- I opened another file here to write output These two lines r just to say how I'm proceeding... The err msg which I got is... "Can't modify constant item in scalar assignment at test_script.pl line 1, near " );" syntax error at test_script.pl line 13,

add timer to program

2005-10-14 Thread Beast
Hello, My perl script requires to invoke external program, however this external program sometimes take forever to complete. The external program accessing /dev/ircomm0 and whenever the IR client was hang or out of range, this program try to search forever making the calling program seems to

Writing a mail filter...

2005-10-14 Thread Jessica Rasku
I am wanting to write a mail filter which will allow me to use a score sheet and a configuration file to filter mail into specific folders. This would be accomplished in conjunction with procmail, and possibly formail. The program would have to take the message and scan it for certain paterns, an

Re: Repetead values

2005-10-14 Thread Rafael Morales
Yes it works but I also need to print the files with values with '0', and your code just prints the files that have values different of '0', for example when I use your code I got this: 2005-09-19 - NA - 56 - 788 2005-09-19 - NA - 43 - 540 2005-09-19 - NE - 10 - 975 2005-09-19 - SP - 23 - 321

Re: Thank you for your answer. And yesterday i was write from Nahid`s email address

2005-10-14 Thread Ulfet
Thankuyu very mush for your asnwer. So i will on monday write the question and will try what i want and what i need.

Re: I need help here

2005-10-14 Thread John W. Krahn
Sreedhar reddy wrote: > Hi, Hello, > I am very new to PERL and I need a program to do following task. Can u help > me pls. > > > I have a file with following contents. > > 454 NV_DS_DEFAULT_BAUDRATE_I > 455 NV_DIAG_DEFAULT_BAUDRATE_I > 516 NV_WCDMA_RX_LIN_VS_TEMP_I > > I am expecting out put

Re: remainder function

2005-10-14 Thread Xavier Noria
On Oct 15, 2005, at 0:02, ZHAO, BING wrote: Hi, Is there a remainder function, since I need to check if a number is divisible by another? Yes, the modulus operator: print "$n is divisible by $m" if $n % $m == 0; -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

remainder function

2005-10-14 Thread ZHAO, BING
Hi, Is there a remainder function, since I need to check if a number is divisible by another? Thank you all. best, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Repetead values

2005-10-14 Thread John W. Krahn
Rafael Morales wrote: > Hi. Hello, > My trouble is with a value duplicated value on a nested foreach, these are my > variables: > > %names=( > 1=>'NA' > 2=>'NCW' > 3=>'NE' > 4=>'S' > 5=>'SE' > 6=>'SP' >); > > %hash{'2005-09-19'}{'1'}{'56'

How do I create async child process?

2005-10-14 Thread Siegfried Heintze
Is there a vendor neutral way to create an asynchronous child process in perl? I know the back quotes create a synchronous one but I want multiple asynch child processes. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Re: using XS for calling exported methods from a DLL

2005-10-14 Thread Bernard Kenik
- Original Message - From: "Beau E. Cox" <[EMAIL PROTECTED]> To: "Bernard Kenik" <[EMAIL PROTECTED]> Cc: "Beginners Perl" Sent: Friday, October 14, 2005 1:29 PM Subject: Re: Re: using XS for calling exported methods from a DLL Hi Bernard et. al. - At 2005-10-14, 07:01:39 you wrote: A

Re: non-ascii characters?

2005-10-14 Thread Charles Farinella
On Fri, 2005-10-14 at 15:34, Jeff 'japhy' Pinyan wrote: > On Oct 14, Charles Farinella said: > > > Does anyone know how I can search for non-ascii characters in a text > > file? > > By non-ASCII, do you mean characters high-bit ASCII or Unicode? h, I'm already in over my head. I'm tryin

Re: XML::XPath query

2005-10-14 Thread Jeff 'japhy' Pinyan
On Oct 14, H S said: Could someone help point out how to use scalar within Xpath query? I need to use $script in the query but it returns nothing. I am somewhat confused about the interpolation in this case. use XML::XPath; my $xp = XML::XPath->new(filename => '/dssweb/prog/navi/links.xml');

Re: non-ascii characters?

2005-10-14 Thread Jeff 'japhy' Pinyan
On Oct 14, Charles Farinella said: Does anyone know how I can search for non-ascii characters in a text file? By non-ASCII, do you mean characters high-bit ASCII or Unicode? -- Jeff "japhy" Pinyan% How can we ever be the sold short or RPI Acacia Brother #734% the cheated, we who

XML::XPath query

2005-10-14 Thread H S
Hello, Could someone help point out how to use scalar within Xpath query? I need to use $script in the query but it returns nothing. I am somewhat confused about the interpolation in this case. Thanks, Isarin use XML::XPath; my $xp = XML::XPath->new(filename => '/dssweb/prog/navi/links.xml');

regd. validation the delimiter(of flat file) is not present in databse..........

2005-10-14 Thread mayank . ahuja
Hi Perlers Could you please tell me how to check a particular character is not present in the each element of array in one go ...I mean not going to eamine each and every element of the arraymeans by loop method. I dont want to use the for or while loo

RE: Quering Msql database from perl

2005-10-14 Thread Timothy Johnson
Sign up for the dbi-users list. http://dbi.perl.org/support/ -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Friday, October 14, 2005 12:13 PM To: K.Moeng Cc: beginners@perl.org Subject: Re: Quering Msql database from perl This is an SQL question rather

non-ascii characters?

2005-10-14 Thread Charles Farinella
Does anyone know how I can search for non-ascii characters in a text file? --charlie -- Charles Farinella Appropriate Solutions, Inc. (www.AppropriateSolutions.com) [EMAIL PROTECTED] 603.924.6079 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Quering Msql database from perl

2005-10-14 Thread Jeff 'japhy' Pinyan
On Oct 14, K.Moeng said: $dsn= "dbi:mysql:db_doom:localhost"; So it's a mysql table, not an Msql table. $statement = "select msg from t_main where votes = (this is where Iam stuck) "greater than others" This is an SQL question rather than a Perl question, but I will answer it for you. I

Repetead values

2005-10-14 Thread Rafael Morales
Hi. My trouble is with a value duplicated value on a nested foreach, these are my variables: %names=( 1=>'NA' 2=>'NCW' 3=>'NE' 4=>'S' 5=>'SE' 6=>'SP' ); %hash{'2005-09-19'}{'1'}{'56'}=788; %hash{'2005-09-19'}{'1'}{'43'}=540; %hash{'2005-09-1

Quering Msql database from perl

2005-10-14 Thread K.Moeng
hello, If i am running perl and i want to qury the Msql Database records how do that from perl. HERE ARE CLUES: DATABASE NAME: DOOM TABLE NAME: T_MAIN RECORDS:VOTE & VOTES RECORD TO QUERY:VOTES PROCEDURE: WHERE A VALUE UNDER VOTE

RE: Re: ENV(Y)?

2005-10-14 Thread Gomez, Juan
Tom to unsubscribe send a blank email to these address [EMAIL PROTECTED] Cheers Armando Gomez Guajardo Process Engineer Work Ph 956 547 6438 Beeper956 768 4070 -Original Message- From: Gustav Wiberg [mailto:[EMAIL PROTECTED] Sent: Friday, October 14, 2005 12:28 PM To: Th

Re: Re: ENV(Y)?

2005-10-14 Thread Gustav Wiberg
Hi! I got your mail from the Perl-malinglist. You have to unscribe from that list manually yourself. Best regards /G http://www.varupiraten.se/ - Original Message - From: "Thomas J Hughes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 14, 2005 6:19 PM Subject: Re

Re: using XS for calling exported methods from a DLL

2005-10-14 Thread Bernard Kenik
- Original Message - Sent: Friday, October 14, 2005 12:24 PM If you want the complete module to copy/study/etc., let me know and I will send it to you off-list. Aloha => Beau; [EMAIL PROTECTED] 2005-10-14 Please send it to me also. I am trying to use a function from a dll. It has

Re: Space problem

2005-10-14 Thread John Doe
Martha kavishe am Freitag, 14. Oktober 2005 15.47: > Hi All, Hi Martha Marcello already explained that the shell uses spaces to separate arguments, e.g. # my_prog gu 1 passes "gu" and "1" in @ARGV to the prog, while # my_prog "gu 1" will pass only "gu 1" (without quotes; these are handled

Re: Thank you for your answer. And yesterday i was write from Nahid`s email address

2005-10-14 Thread Thomas J Hughes
Please remove my email address from your list, thanks Tom On 10/14/05, Chris Devers <[EMAIL PROTECTED]> wrote: > If you want to discuss Beginners Perl, send your messages to the > beginners@perl.org list address. I am a subscriber and will see your > response there, as will dozens of other helpf

Re: Identifying or finding paragraphs

2005-10-14 Thread Thomas J Hughes
Please remove my email address from your list, thanks Tom On 10/14/05, Chris Devers <[EMAIL PROTECTED]> wrote: > On Fri, 14 Oct 2005, Dave Adams wrote: > > > How paragraphs are delimited is actually my question. In otherwords, > > when perl reads in my string, can it identify where the paragraph

Re: Identifying or finding paragraphs

2005-10-14 Thread Chris Devers
On Fri, 14 Oct 2005, Dave Adams wrote: How paragraphs are delimited is actually my question. In otherwords, when perl reads in my string, can it identify where the paragraphs breaks are? In my example, $text was created in wordpad where 'This is the FIRST paragraph' and 'This is the SECOND

Re: Identifying or finding paragraphs

2005-10-14 Thread Dave Adams
How paragraphs are delimited is actually my question. In otherwords, when perl reads in my string, can it identify where the paragraphs breaks are? In my example, $text was created in wordpad where 'This is the FIRST paragraph' and 'This is the SECOND paragraph' are seperated by a paragraph break

Re: Space problem

2005-10-14 Thread Marcello
Martha kavishe ha scritto: Hi All, I received some response to my problem but unfortunately my problem isn't solved, I'm still struggling.. Thank you all for your contribution Here is a better short code for the program which gives a clear picture of what I'm trying to ask help for. use DB

Re: Identifying or finding paragraphs

2005-10-14 Thread Xavier Noria
On Oct 14, 2005, at 16:13, Dave Adams wrote: Question: How do you find a paragraph break in perl? Synopsis: In a string I need to find the paragraph breaks and replace it with a ^P. Here is my code. How are paragraphs delimited? Can you give an example with a couple of paragraphs and the

Identifying or finding paragraphs

2005-10-14 Thread Dave Adams
Question: How do you find a paragraph break in perl? Synopsis: In a string I need to find the paragraph breaks and replace it with a ^P. Here is my code. #!/usr/bin/perl -w use strict; use Text::Wrap; $my text = 'This is the FIRST paragraph. This is the SECOND paragraph.'; print wrap("\t","^P

Space problem

2005-10-14 Thread Martha kavishe
Hi All, I received some response to my problem but unfortunately my problem isn't solved, I'm still struggling.. Thank you all for your contribution Here is a better short code for the program which gives a clear picture of what I'm trying to ask help for. use DBI; $dsn= "dbi:mysql:db_martha:

RE: I need help here

2005-10-14 Thread Chris Devers
You accidentally replied just to me, not to the list. Please don't do that. Send all messages to the list and I will read them there, along with all the other helpful list subscribers. On Fri, 14 Oct 2005, Sreedhar reddy wrote: I tried like this... INPUT = fopen("filename"); OUTPUT -- I op

RE: I need help here

2005-10-14 Thread Sreedhar reddy
Chris- Can u suggest good links to gain good knowledge in PERL... Thanks, Sridhar Reddy -Original Message- From: Chris Devers [mailto:[EMAIL PROTECTED] Sent: Friday, October 14, 2005 6:06 PM To: Sreedhar reddy Cc: beginners@perl.org Subject: Re: I need help here On Fri, 14 Oct

RE: I need help here

2005-10-14 Thread Sreedhar reddy
Hi Chris... I tried like this... INPUT = fopen("filename"); OUTPUT -- I opend another file here to write output while() { chomp @_; @strings = split(@_, " "); print OUTPUT strings[1] + strings[0]; } But I got error msg...Can u modify this program if it is correct??? -Original Message---

RE: Perl for Windows xp

2005-10-14 Thread Gomez, Juan
http://www.activestate.com/store/languages/register.plex?id=ActivePerl Try here friend Armando Gomez Guajardo Process Engineer Work Ph 956 547 6438 Beeper956 768 4070 -Original Message- From: Jenny Chen [mailto:[EMAIL PROTECTED] Sent: Thursday, October 13, 2005 6:11 PM To: be

Re: Re: Re: ENV(Y)?

2005-10-14 Thread gustav
AHA!! Ok, thanx! Now I understand it better... :-) /G http://www.varupiraten.se/ > Hi Custav - > > At 2005-10-14, 02:23:59 you wrote: >>Hi again! >> >>I've been looking around... >> >>And one thing I don't get. You tell me that > SOMEVAR will be available >> to >>you in your program and any prog

Re: Re: Re: ENV(Y)?

2005-10-14 Thread Beau E. Cox
Hi Custav - At 2005-10-14, 02:23:59 you wrote: >Hi again! > >I've been looking around... > >And one thing I don't get. You tell me that > SOMEVAR will be available to >you in your program and any programs you spawn( with 'system' or >backtics). But after your perl script ends, SOMEVAR is lost) a

Re: I need help here

2005-10-14 Thread Chris Devers
On Fri, 14 Oct 2005, Sreedhar reddy wrote: I am very new to PERL and I need a program to do following task. Can [you] help me [please][question-mark] I have a file with following contents. 454 NV_DS_DEFAULT_BAUDRATE_I 455 NV_DIAG_DEFAULT_BAUDRATE_I 516 NV_WCDMA_RX_LIN_VS_TEMP_I I am expecti

Re: Thank you for your answer. And yesterday i was write from Nahid`s email address

2005-10-14 Thread Chris Devers
If you want to discuss Beginners Perl, send your messages to the beginners@perl.org list address. I am a subscriber and will see your response there, as will dozens of other helpful people. On Fri, 14 Oct 2005 [EMAIL PROTECTED] wrote: My name is Ulfet. Yesterday i was written from Nahid`s ema

Re: Re: ENV(Y)?

2005-10-14 Thread gustav
Hi again! I've been looking around... And one thing I don't get. You tell me that > SOMEVAR will be available to you in your program and any programs you spawn( with 'system' or backtics). But after your perl script ends, SOMEVAR is lost) and this seems to be correct when I test my program, but I

I need help here

2005-10-14 Thread Sreedhar reddy
Hi, I am very new to PERL and I need a program to do following task. Can u help me pls. I have a file with following contents. 454 NV_DS_DEFAULT_BAUDRATE_I 455 NV_DIAG_DEFAULT_BAUDRATE_I 516 NV_WCDMA_RX_LIN_VS_TEMP_I I am expecting out put like NV_DS_DEFAULT_BAUDRATE_I 454 NV_DIAG_DEFAULT_

Re: Space proplem

2005-10-14 Thread pan
Hi Martha, Although I do not understand exactly what it is that you want, the following could help ... #1# $msg =~ s/\"/'/igx; #2# if (($msg=~ /gu1/i) && ($msg !~ /gu1[0123456789]+/i)) First remove line #1#. I guess you did an attempt to remove quotes here, that weren't even there (you can see i

Re: using XS for calling exported methods from a DLL

2005-10-14 Thread Beau E. Cox
Hi Sam- At 2005-10-14, 00:05:10 you wrote: >Hi > >Is there a way to call exported methods from a DLL without using win32::API. > >Has anyone tried calling an exported function from C DLL in a Perl Program >using XS. > [snipped] YES! First, your error is caused because you need an 'export' lib

Re: Re: ENV(Y)?

2005-10-14 Thread Beau E. Cox
Hi gustav - At 2005-10-13, 23:42:22 you wrote: >Hi! > >Just a quick question. Can I set or unset an enviromentvariable through >this Hash? I just need a yes ... :-) >If No, please give explanation... Not really. If you do something like: $ENV{SOMEVAR} = 'somevalue'; SOMEVAR will be available

Re: ENV(Y)?

2005-10-14 Thread gustav
Hi! Just a quick question. Can I set or unset an enviromentvariable through this Hash? I just need a yes ... :-) If No, please give explanation... /G http://www.varupiraten.se/ > Hi! > > Thanx a LOT!!! > > /G > http://www.varupiraten.se/ > > >> Hi Gustav - >> >> At 2005-10-13, 23:13:33 you wro

Space proplem

2005-10-14 Thread Martha kavishe
Hi There;   i have this problem of space in my program. The program requires a user to send in Either GU1 or TR1. When they send GU1 or TR1 it accepts it and that is fine. But My concern is; if they send GU 1 or TR 1(Leaving spaces before the number) then the program doesn't accept. It goes

using XS for calling exported methods from a DLL

2005-10-14 Thread sam joseph
Hi Is there a way to call exported methods from a DLL without using win32::API. Has anyone tried calling an exported function from C DLL in a Perl Program using XS. I have a C DLL's source file and its header file and using h2xs D:\DLLProjects\simpledll3>h2xs -n ext2 simpledll3.h Writing ext

Re: ENV(Y)?

2005-10-14 Thread gustav
Hi! Thanx a LOT!!! /G http://www.varupiraten.se/ > Hi Gustav - > > At 2005-10-13, 23:13:33 you wrote: >>Hi there! >> >>I'd like to get a list of enviromentvariables from the *NIX-system. >> >>I'd like it in the format... >>ENV1=x1 >>ENv2=x2 >>ENV3=x3 >> >>and so on... >> >>I think I have to use

Re: ENV(Y)?

2005-10-14 Thread Beau E. Cox
Hi Gustav - At 2005-10-13, 23:13:33 you wrote: >Hi there! > >I'd like to get a list of enviromentvariables from the *NIX-system. > >I'd like it in the format... >ENV1=x1 >ENv2=x2 >ENV3=x3 > >and so on... > >I think I have to use ENV-command. (http://perldoc.perl.org/Env.html) Is >that right? I

ENV(Y)?

2005-10-14 Thread gustav
Hi there! I'd like to get a list of enviromentvariables from the *NIX-system. I'd like it in the format... ENV1=x1 ENv2=x2 ENV3=x3 and so on... I think I have to use ENV-command. (http://perldoc.perl.org/Env.html) Is that right? I don't understand how I get this kind of listing. Please put me