Re: Where will I find perl scripts

2005-05-10 Thread John W. Krahn
Tielman Koekemoer (TNE) wrote: Thanks all for your info - VERY informative. Although I now feel the need to say: Hang in there Charles. I'm sure not all Perl babes rate their partners according to their scripting prowess. All drop-dead gorgeous Perl programmers, you know who to contact... ;)

Question on File::Find.

2005-05-10 Thread arkster
Hi All, I'm trying to find a way to compare the files and folders contained within 2 separate directory structures to determine whether they are identical or not. For this I tried using the File::Find module but got stuck at a certain point. I looked online and in some books but couldnt find a

debugging XS code.

2005-05-10 Thread Rajarshi Das
Hi, I am running perl-5.8.6 on z/OS. How do I debug XS code ? 1) I have a specific function static SV *encode_method() in a xs file. The fn name remains the same in the corresponding c file. I am unable to break at this fn within the c file although perl is built with -g. Any thoughts on how to

Re: Question on File::Find.

2005-05-10 Thread John Doe
Am Dienstag, 10. Mai 2005 08.34 schrieb [EMAIL PROTECTED]: Hi All, I'm trying to find a way to compare the files and folders contained within 2 separate directory structures to determine whether they are identical or not. For this I tried using the File::Find module but got stuck at a

Re: sorting a hash

2005-05-10 Thread Octavian Rasnita
Ok, thank you much. Teddy - Original Message - From: Chris Charley [EMAIL PROTECTED] To: beginners@perl.org Sent: Monday, May 09, 2005 11:07 PM Subject: Re: sorting a hash Hi Teddy This works :-) for (sort byname keys %$ref) { print $_ has the name $ref-{$_}{name} and has

Re: about substring

2005-05-10 Thread FreeFall
Or you can try: __BEGIN__ #!/usr/bin/perl use warnings; use strict; my @decimals; $_ = 'atom 12 N VAL A 1 12.435 13.66 34.6 32.1 32 a N'; push @decimals,$1 while (/(\d+\.?\d*)/g); print @decimals\n; __END__ On Mon, 9 May 2005 19:04:08 +0530 Aditi Gupta [EMAIL PROTECTED] wrote: Hi

Re: about substring

2005-05-10 Thread John Doe
Am Dienstag, 10. Mai 2005 09.14 schrieb FreeFall: use warnings; use strict; my @decimals; $_ =  'atom 12 N  VAL  A  1  12.435  13.66 34.6  32.1 32   a N'; push @decimals,$1 while (/(\d+\.?\d*)/g); print @decimals\n; Or, shorter (no need to use while _and_ //g): use warnings; use strict;

Re: about substring

2005-05-10 Thread FreeFall
On Tue, 10 May 2005 09:22:31 +0200 John Doe [EMAIL PROTECTED] wrote: my @decimals= /(\d+\.?\d*)/g; cool! Thanks! -- Whatever you do will be insignificant,but the important is you do it! It doesn't matter who you are, it's what you do that takes you far! -- To unsubscribe, e-mail: [EMAIL

Re: about substring

2005-05-10 Thread Ing. Branislav Gerzo
John Doe [JD], on Tuesday, May 10, 2005 at 09:22 (+0200) made these points: JD Or, shorter (no need to use while _and_ //g): JD use warnings; JD use strict; JD $_ = 'atom 12 N VAL A 1 12.435 13.66 34.6 32.1 32 a N'; JD my @decimals= /(\d+\.?\d*)/g; JD print @decimals\n; very nice

Search pattern not terminated

2005-05-10 Thread baskaran
Dear Sirs, I could not able to store data into single array variable by using @sampletext=qw/ /; But the data has /,\,:,;{,},[,],%,$,#,@, ... everything in keyboard characters. suppose the data contains / then it says some error Search pattern not terminated at style.pl line 24. Kindly

Computing elapsed time in this format hh:mm:ss.

2005-05-10 Thread Harold Castro
I need to compute the total elapsed time with this format: start end Total 06:30:17 09:00:14 2.50 hours Do you know any shortcut to this instead of splitting each number in between colons? Discover Yahoo! Get on-the-go sports scores, stock quotes, news

Re: Search pattern not terminated

2005-05-10 Thread Ing. Branislav Gerzo
baskaran [b], on Tuesday, May 10, 2005 at 13:13 (+0530) contributed this to our collective wisdom: b suppose the data contains / then it says some error b Search pattern not terminated at style.pl line 24. b Kindly suggest me a solution. try to escape that with \; so you have \/. should work.

Re: Computing elapsed time in this format hh:mm:ss.

2005-05-10 Thread Ing. Branislav Gerzo
Harold Castro [HC], on Tuesday, May 10, 2005 at 00:54 (-0700 (PDT)) wrote these comments: HC start end Total HC 06:30:17 09:00:14 2.50 hours HC Do you know any shortcut to this instead of splitting HC each number in between colons? never need this, but you should look at:

Perl threads

2005-05-10 Thread Anbu Gandhi R A
Is there any good reference/web-site from which I can get a better understanding of thread::shared module. I see this error when I execute my file. error: thread failed to start: Invalid value for shared scalar When does this error occur? Thanks Anbu Gandhi

Pattern matching problem

2005-05-10 Thread Tielman Koekemoer \(TNE\)
Hi all, I have tried various regular expressions to remove null or empty values on array @array1 and create a new array @OPD01 with the values. This, however, does not work as I still get a number of empty values in the @OPD01 array after this processing. As you'll see I tried various things -

Re: Pattern matching problem

2005-05-10 Thread John Doe
Am Dienstag, 10. Mai 2005 11.01 schrieb Tielman Koekemoer (TNE): Hi all, I have tried various regular expressions to remove null or empty values on array @array1 and create a new array @OPD01 with the values. This, however, does not work as I still get a number of empty values in the @OPD01

Re: Pattern matching problem

2005-05-10 Thread Ing. Branislav Gerzo
Tielman Koekemoer (TNE) [TK], on Tuesday, May 10, 2005 at 11:01 (+0200) contributed this to our collective wisdom: TK I have tried various regular expressions to remove null or empty TK values on array @array1 and create a new array @OPD01 with the values. TK This, however, does not work as I

Re: Pattern matching problem

2005-05-10 Thread Kpramod
Hi John, Try to use 'chop' to get null value Thanks and Regards Pramod John Doe wrote: Am Dienstag, 10. Mai 2005 11.01 schrieb Tielman Koekemoer (TNE): Hi all, I have tried various regular expressions to remove null or empty values on array @array1 and create a new array @OPD01 with the values.

RE: Pattern matching problem

2005-05-10 Thread Tielman Koekemoer \(TNE\)
$counter2 = 0; What's that for? (never used) Hmm yeah sorry that was supposed to be $counter = 0; Use push() to avoid holding the current array index. What do you mean by holding the index? my @array1=(' ', 'a', '', 'b', \0, 'c', undef, 'd', ' ', 'e'); my @new=grep {$_ and !/^\s+$/ and

Re: how to get and setup Perl

2005-05-10 Thread sanobabu
Sincerely your, sanobabu [EMAIL PROTECTED] -- www.MailNavigator.com - Find your email and news! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: Pattern matching problem

2005-05-10 Thread Tielman Koekemoer \(TNE\)
Ah I see: use push() to add scalars/lists to arrays. Thanks everyone for the help. Use push() to avoid holding the current array index. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: Question on File::Find.

2005-05-10 Thread Randal L. Schwartz
John == John Doe [EMAIL PROTECTED] writes: John Something like (untested): John # build hashes with pairs (filename=0) John # John my %first=map {$_=1} find (sub {}, $dir1); John my %second=map {$_=1} find (sub {}, $dir2); Good thing that untested is in there, because find() doesn't return

Re: Setup of ActivePerl Modules HELP!

2005-05-10 Thread FlashMX
Hi, I have a Perl script that requires the following module to be installed. use File::Find; open(IN,$File::Find::name) or ... WHen I ran the PPM and did a search for Find I couldn't find the module File-Find? Which one do I have to install? This is what gets listed: 26.

RE: Setup of ActivePerl Modules HELP!

2005-05-10 Thread Cristi Ocolisan
Hi Flash -:) Usually the File::Find module is already installed with your perl distribution. CO -Original Message- From: FlashMX [mailto:[EMAIL PROTECTED] Sent: 10 mai 2005 15:42 To: beginners@perl.org Subject: Re: Setup of ActivePerl Modules HELP! Hi, I have a Perl script that

Re: sorting a hash

2005-05-10 Thread perlocean
- Original Message - From: Chris Charley [EMAIL PROTECTED] To: beginners@perl.org Sent: Monday, May 09, 2005 7:03 PM Subject: Re: sorting a hash - Original Message - From: [EMAIL PROTECTED] Newsgroups: perl.beginners To: Octavian Rasnita [EMAIL PROTECTED]; beginners@perl.org

Re: OT: nntp messages

2005-05-10 Thread luhao
As I know, Becky! Ver.2 with a plugin can download all newsgroup messages as if they are regular mails.(Very huge messages stacked in your disk!) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Urgent Help with functions

2005-05-10 Thread Madhur Kashyap
Can someone help me out with this simple code? It gives an error saying: Illegal division by zero at test.pl line 4. Exit 255 Code: - #!/usr/local/bin/perl sub test { =09my @[EMAIL PROTECTED]; =09my $div=3D$pars[0]/$par[1]; =09print Pars were @{_}\n; }

Re: Setup of ActivePerl Modules HELP!

2005-05-10 Thread [EMAIL PROTECTED]
Hi, I have a Perl script that requires the following module to be installed. use File::Find; open(IN,$File::Find::name) or ... type something like that. btw, it's in the documentation :-) perl -MFile::Find -e 1;# if it doesn't complain it's installed --manfred -- To unsubscribe, e-mail:

RE: Urgent Help with functions

2005-05-10 Thread Larsen, Errin M HMMA/IT
-Original Message- From: Madhur Kashyap [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 11:34 AM To: beginners@perl.org Subject: Urgent Help with functions Can someone help me out with this simple code? It gives an error saying: Illegal division by zero at test.pl

Re: Urgent Help with functions

2005-05-10 Thread Jay Savage
On 5/10/05, Larsen, Errin M HMMA/IT [EMAIL PROTECTED] wrote: -Original Message- From: Madhur Kashyap [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 11:34 AM To: beginners@perl.org Subject: Urgent Help with functions Can someone help me out with this simple code? It

Re: Question on File::Find.

2005-05-10 Thread John Doe
Am Dienstag, 10. Mai 2005 13.54 schrieb Randal L. Schwartz: John == John Doe [EMAIL PROTECTED] writes: John Something like (untested): John # build hashes with pairs (filename=0) John # John my %first=map {$_=1} find (sub {}, $dir1); John my %second=map {$_=1} find (sub {}, $dir2); Good

Re: Pattern matching problem

2005-05-10 Thread John Doe
Am Dienstag, 10. Mai 2005 11.46 schrieb Tielman Koekemoer (TNE): $counter2 = 0; What's that for? (never used) Hmm yeah sorry that was supposed to be $counter = 0; Use push() to avoid holding the current array index. What do you mean by holding the index? remember (and incrementing) the

Re: Pattern matching problem

2005-05-10 Thread John Doe
Am Dienstag, 10. Mai 2005 11.23 schrieb Kpramod: Hi John, Try to use 'chop' to get null value Thanks and Regards Pramod Hi Pramad, sorry, I don't understand what you mean. Do you refer to the line my @new=grep {$_ and !/^\s+$/ and !/^\0+$/} @array1; (I see that the test for \0 is ugly,

Re: returning a hash from a method call ?

2005-05-10 Thread John Doe
Hi Graeme Based on the code snippets you provide, it's not clear (at least to me) what you want to achieve. Is it possible that you post the module? Am Dienstag, 10. Mai 2005 13.34 schrieb Graeme McLaren: John, here's the function I'm talking about. an object method? I want to return a

Re: Search pattern not terminated

2005-05-10 Thread John W. Krahn
baskaran wrote: Dear Sirs, Hello, I could not able to store data into single array variable by using @sampletext=qw/ /; But the data has /,\,:,;{,},[,],%,$,#,@, ... everything in keyboard characters. suppose the data contains / then it says some error Search pattern not terminated at style.pl line

Re: Urgent Help with functions

2005-05-10 Thread Paul Johnson
On Tue, May 10, 2005 at 10:03:57PM +0530, Madhur Kashyap wrote: Can someone help me out with this simple code? It gives an error saying: Illegal division by zero at test.pl line 4. Exit 255 Code: - #!/usr/local/bin/perl sub test { =09my

RE: Urgent Help with functions

2005-05-10 Thread Christian, Ed
-Original Message- From: Madhur Kashyap [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 12:34 PM To: beginners@perl.org Subject: Urgent Help with functions Can someone help me out with this simple code? It gives an error saying: Illegal division by zero at test.pl line 4. Exit

Help with substitution

2005-05-10 Thread Tham, Philip
Hi I have a string which reoccuring patterns 1abc2abc3abc4abc567 How do I remove everything before the 1st occrence of abc to get the result 2abc3abc4abc567 s/^.*abc// Gives me 567 Thanks in advance. Philip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

looping over a tied hash problem

2005-05-10 Thread Graeme McLaren
HI all, I have a function which is tying a hash and when I pass it to another function I want to be able to get the values of the hash in the order they were set in, how would I do this? Here's the function with the hash: sub

Re: Help with SOAP-Lite request in Perl

2005-05-10 Thread Wiggins d'Anconia
Grant wrote: Hello, I'm trying to make a successful request to the Google AdWords API. My Perl skills are extremelly weak. Here's the error I'm getting: SOAP Fault: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying

RE: Help with substitution

2005-05-10 Thread Moon, John
To: 'Tham, Philip' Subject: RE: Help with substitution Subject: Help with substitution Hi I have a string which reoccuring patterns 1abc2abc3abc4abc567 How do I remove everything before the 1st occrence of abc to get the result 2abc3abc4abc567 s/^.*abc// Gives me 567 Thanks in advance.

RE: Help with substitution

2005-05-10 Thread David Aldridge
This worked for me. Don't forget the 'greedy' regex: s/^.*?(abc)//; -Original Message- From: Tham, Philip [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 3:59 PM To: beginners@perl.org Subject: Help with substitution Hi I have a string which reoccuring patterns

Re: looping over a tied hash problem

2005-05-10 Thread Dave Gray
I'm kind of lost as to what you're actually trying to do. Instead of posting functions with nothing calling them, you should include a code snippet (as simple as possible) that can be run to demonstrate the problem. Preferably not using those functions. Fix one thing at a time. With that said,

RE: gcc on Solaris

2005-05-10 Thread Bliss, Kevin
-Original Message- From: Larsen, Errin M HMMA/IT [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 8:15 AM To: beginners@perl.org Subject: gcc on Solaris ... And I execute the following command line to test the gcc installation: # gcc helloworld.c -o helloworld ld.so.1: gcc:

Re: Urgent Help with functions

2005-05-10 Thread Madhur Kashyap
Thanks for the help Lessons learned as a beginner: 1) Never write codes when you are sleepy. 2) Always use strict/warnings pragma, that will be extremely helpful incase you can't obey previous rule. Hope thats important for every beginner. On 5/11/05, Paul Johnson [EMAIL PROTECTED] wrote:

Re: Comparing Multiple files with single file one by one

2005-05-10 Thread N. Ganesh Babu
N. Ganesh Babu wrote: Dear All, My requirement is to compare the typing exam results. For Example: 1. 281 and 289 are the text files of the candidates. 2. I am having master.txt 3. I need to compare the 281 with master.txt and get the result. 4. I need to compare the 289 with master.txt and get