Re: Please help: perl run out of memory

2022-04-27 Thread David Emanuel da Costa Santiago
Às 11:33 de 17/04/22, wilson escreveu: hello the experts, can you help check my script for how to optimize it? currently it was going as "run out of memory". $ perl count.pl Out of memory! Killed My script: use strict; my %hash; my %stat; To be honest you don't need the %stat, however

Re: Please help: perl run out of memory

2022-04-26 Thread hw
On Sun, 2022-04-17 at 17:33 +0800, wilson wrote: > hello the experts, > > can you help check my script for how to optimize it? > currently it was going as "run out of memory". > > $ perl count.pl > Out of memory! > Killed I would use a database like Mariadb for this, not only to create a repor

Re: Please help: perl run out of memory

2022-04-22 Thread David Precious
On Thu, 21 Apr 2022 07:12:07 -0700 al...@coakmail.com wrote: > OP maybe need the streaming IO for reading files. Which is what they were already doing - they used: while () { ... } Which, under the hood, uses readline, to read a line at a time. (where "HD" is their global fileh

Re: Please help: perl run out of memory

2022-04-21 Thread alice
OP maybe need the streaming IO for reading files. Thanks On 2022-04-21 21:56, David Precious wrote: > On Thu, 21 Apr 2022 17:26:15 +0530 > "M.N Thanishka sree Manikandan" wrote: > >> Hi wilson >> Try this module file::slurp > > Given that the OP is running into memory issues processing an 80

Re: Please help: perl run out of memory

2022-04-21 Thread David Precious
On Thu, 21 Apr 2022 17:26:15 +0530 "M.N Thanishka sree Manikandan" wrote: > Hi wilson > Try this module file::slurp Given that the OP is running into memory issues processing an 80+ million line file, I don't think suggesting a CPAN module designed to read the entire contents of a file into mem

Re: Please help: perl run out of memory

2022-04-21 Thread M.N Thanishka sree Manikandan
Hi wilson Try this module file::slurp Regards, Manikandan On Sun, 17 Apr, 2022, 15:03 wilson, wrote: > hello the experts, > > can you help check my script for how to optimize it? > currently it was going as "run out of memory". > > $ perl count.pl > Out of memory! > Killed > > > My script: > u

Re: Please help: perl run out of memory

2022-04-21 Thread Adriel Peng
I am not sure, but can Tie::Hash etc be used by tying hash to a local file to reduce the memory use? regards.

Re: Please help: perl run out of memory

2022-04-18 Thread Rob Coops
Hi Wilson, Looking at the script I see some room for improvement. You currently declare %hash as a global variable, and keep it around forever. With tens of millions of rows that is quite a large structure to just have sitting around after you have build the %stat hash. So I would start by limitin

Re: Please help: perl run out of memory

2022-04-17 Thread David Mertens
I see nothing glaringly inefficient in the Perl. This would be fine on your system if you were dealing with 1 million items, but you could easily be pushing up against your system's limits with the generic data structures that Perl uses, especially since Perl is probably using 64-bit floats and int

Re: Please can you opt me out from receiving mails from you.

2021-02-05 Thread Wesley Peng
You can send an email to beginners-unsubscr...@perl.org to unsubscribe yourself from it. On Fri, Feb 5, 2021, at 4:20 PM, ONYEDIKACHI NNADI wrote: > Please can you opt my email address dikachi4...@gmail.com from receiving > emails from you. Thanks in anticipation for your prompt action.

Re: Please remove me from this mailing list

2015-11-22 Thread Shlomi Fish
Hi, please E-mail beginners-unsubscr...@perl.org to unsubscribe. It's too bad the messages from beginners@perl.org don't have a footer as of now. Regards, Shlomi Fish -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Re: Please remove me from this mailing list

2015-11-22 Thread Andrew Solomon
To remove yourself from this list, please follow the instructions here: http://lists.perl.org/list/beginners.html Kind regards, Andrew On Sun, Nov 22, 2015 at 3:25 PM, c mullan wrote: > Me too - thank you. > > On Sun, Nov 22, 2015 at 3:15 AM, longjianggu > wrote: > >> >> >> Thanks! >> >> >

Re: Please remove me from this mailing list

2015-11-22 Thread c mullan
Me too - thank you. On Sun, Nov 22, 2015 at 3:15 AM, longjianggu wrote: > > > Thanks! > >

Re: Please remove me from this mailing list

2015-11-17 Thread Divyesh Shah via beginners
To unsubscribe, e-mail: beginners-unsubscr...@perl.org Best Regards,Divyesh Shah On Wednesday, November 18, 2015 6:17 AM, Hannah Smithers wrote: Thanks!

Re: Please check my logic

2014-07-23 Thread Mike McClain
On Mon, Jul 21, 2014 at 04:01:05PM -0600, Sherman Willden wrote: > > I have several files and I attached one of them. I want to sort the file > and remove duplicate lines. The file is a list of key phrases to search the > internet for. These are long lines so I don't know if this will work. I > wo

Re: Please check my logic

2014-07-21 Thread Sherman Willden
Thank you all. I got off of windows 7 and went to my Ubuntu. Great stuff. Now I have to go back to windows 7 to take the course. Sherman On Mon, Jul 21, 2014 at 4:14 PM, Paul Johnson wrote: > On Mon, Jul 21, 2014 at 10:05:29PM +, Danny Wong (dannwong) wrote: > > > Do it the perl way, hash

Re: Please check my logic

2014-07-21 Thread Paul Johnson
On Mon, Jul 21, 2014 at 10:05:29PM +, Danny Wong (dannwong) wrote: > Do it the perl way, hash it. Or do it the unix way: $ sort -u filename The -u means unique. You also have some lines that differ only in case, so you might prefer: $ sort -uf filename The -f means fold, which ignores

Re: Please check my logic

2014-07-21 Thread Shawn H Corey
On Mon, 21 Jul 2014 16:01:05 -0600 Sherman Willden wrote: > I have several files and I attached one of them. I want to sort the > file and remove duplicate lines. If you're running bash: sort -u file > output_file -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: b

Re: Please check my logic

2014-07-21 Thread Danny Wong (dannwong)
Sheman, Do it the perl way, hash it. 1. Read both files 2. Put the lines into the key of a hash. * While (reading files) * $hash{$_}++; Now you can print/process your hash key. There’s shouldn’t be duplicates. From: Sherman Willden mailto:sherman.will...@gmail.com>> Date: Mo

RE: please help correct my script

2013-11-07 Thread Wang, Li
From: Shaji Kalidasan [shajiin...@yahoo.com] Sent: Thursday, November 07, 2013 4:30 AM To: Wang, Li; beginners@perl.org Subject: Re: please help correct my script Dear Wang, It is actually writing the desired info to the output file "summaryOFdNdS.txt". Here is the content of

RE: please help correct my script

2013-11-07 Thread Wang, Li
Dear Shaji Yes, that is what I want for the output file. Best Li From: Shaji Kalidasan [shajiin...@yahoo.com] Sent: Thursday, November 07, 2013 4:30 AM To: Wang, Li; beginners@perl.org Subject: Re: please help correct my script Dear Wang, It is actually writing

Re: please help correct my script

2013-11-07 Thread Jim Gibson
On Nov 7, 2013, at 2:28 AM, David Precious wrote: > On Wed, 6 Nov 2013 23:51:04 + > "Wang, Li" wrote: > >> Dear Perl Users >> >> I have hundreds of input files, named as geneName_paml_formated.mlc >> In each file, there are some contents similar as follows: >> >> w (dN/dS) for branches:

Re: please help correct my script

2013-11-07 Thread Shaji Kalidasan
Dear Wang, It is actually writing the desired info to the output file "summaryOFdNdS.txt". Here is the content of the output file. In my case, I gave the filename "mydata.txt" as command line argument [content of summaryOFdNdS.txt] geneNamebranchtNSdN/dSdNdSN*dNS*dS mydata.txt5..1      0.043  1

Re: please help correct my script

2013-11-07 Thread David Precious
On Wed, 6 Nov 2013 23:51:04 + "Wang, Li" wrote: > Dear Perl Users > > I have hundreds of input files, named as geneName_paml_formated.mlc > In each file, there are some contents similar as follows: > > w (dN/dS) for branches: 0.00010 1.07967 145.81217 0.00010 > dN & dS for each branch > b

Re: Please throw some light on $? variable

2013-10-23 Thread Shaji Kalidasan
Dear Jim, Thanks for your pointers. It is greatly appreciated.   Sincerely, Shaji --- Your talent is God's gift to you. What you do with it is your gift back to God. ---

Re: Please throw some light on $? variable

2013-10-23 Thread Jim Gibson
On Oct 23, 2013, at 12:56 AM, Shaji Kalidasan wrote: > Dear Perlers > > Please throw some light on the $? variable > > I am trying to figure out how the internal structure (format) of $? variable. > Please throw some light on this topic. The content of $? is explained in the perlvar document.

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread Shlomi Fish
Hi Shaji, On Wed, 26 Jun 2013 18:32:44 +0800 (SGT) *Shaji Kalidasan* wrote: > Shlomi, > > Thanks for pointing out where I am going wrong. I learned a lot from my > programming mistakes. > > Your line by line explanation is really great. It is really worth spending > some time and effort on the

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread Frank Vino
Thanks a lot Shlomi.. :) Regards, Vino On Wed, Jun 26, 2013 at 4:55 PM, Shlomi Fish wrote: > Hi Vino, > > On Wed, 26 Jun 2013 16:43:38 +0530 > Frank Vino wrote: > > > Dear All, > > > > Could you please recommend good beginners book to start, and also > looking > > for videos. > > Please see

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread Shlomi Fish
Hi Vino, On Wed, 26 Jun 2013 16:43:38 +0530 Frank Vino wrote: > Dear All, > > Could you please recommend good beginners book to start, and also looking > for videos. Please see: * http://perl-tutorial.org/ * http://www.perl-begin.org/ (my own link). Regards, Shlomi Fish --

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread Shlomi Fish
On Wed, 26 Jun 2013 11:57:55 +0100 Rob Dixon wrote: > On 26/06/2013 10:32, Shlomi Fish wrote: > >> > >> Hi, > >> > >> Could you please let me know how to reverse a string without using built > >> in function. > > > > Do you want to avoid using the > > http://perldoc.perl.org/functions/reverse.h

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread Rob Dixon
On 26/06/2013 10:32, Shlomi Fish wrote: Hi, Could you please let me know how to reverse a string without using built in function. Do you want to avoid using the http://perldoc.perl.org/functions/reverse.html built-in function or any built-in function whatsoever? Assuming the latter you can

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread *Shaji Kalidasan*
;beginners@perl.org" Sent: Wednesday, 26 June 2013 3:37 PM Subject: Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/ Hello Shaji, some comments about your code. On Wed, 26 Jun 2013 17:52:13 +0800 (SGT) *Shaji Kalidasan* wrote: > Franklin, >

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread Shlomi Fish
Hello Shaji, some comments about your code. On Wed, 26 Jun 2013 17:52:13 +0800 (SGT) *Shaji Kalidasan* wrote: > Franklin, > > Here is one way to do it > > [code] > #Program to reverse a string without using built-in function 1. You're missing "use strict;" and "use warnings;". 2. The commen

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread *Shaji Kalidasan*
Franklin, Here is one way to do it [code] #Program to reverse a string without using built-in function my $str = "Japan is the land of rising sun."; my @str = split '', $str; for ( my $i = $#str ; $i >= 0 ; $i-- ) { print $str[$i]; } [/code] [output] .nus gnisir fo dnal eht si napaJ [/output]  

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2013-06-26 Thread Shlomi Fish
Hi Franklin, to answer your question: On Wed, 26 Jun 2013 12:18:42 +0300 Shlomi Fish wrote: > Begin forwarded message: > > Date: Wed, 26 Jun 2013 14:32:39 +0530 > From: Franklin Lawerence > To: Shlomi Fish > Subject: Re: Please exempt the book Modern Perl from Web Com

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2012-12-26 Thread Shlomi Fish
Hi chromatic, happy holidays and I hope everything is going well for you. On Fri, 2 Nov 2012 23:11:24 +0200 Shlomi Fish wrote: > Hi chromatic, > > first of all, thanks for your work on the book Modern Perl , and for allowing > free use and distribution of it. > > Now, I have mirrored a copy

Re: please Perl help...

2011-09-04 Thread Shlomi Fish
Hi Parag, a few comments on your code. On Sat, 3 Sep 2011 23:38:31 -0700 Parag Kalra wrote: > use strict; > use warnings; > while(){ You should expect the contents of the file to be in a different place than __DATA__, so one should use open or *ARGV or whatever here. > my $num = $. - 1;

Re: please Perl help...

2011-09-03 Thread Uri Guttman
> "PK" == Parag Kalra writes: PK> use strict; PK> use warnings; PK> while(){ PK> my $num = $. - 1; PK> s/\d+/$num/ if /\w+\s+\d+\s+\w/; there is no need for the if as you can just do a s/// directly. and it can do the num part as well. s/(\w+\s+)\d+(\s+\w+)/$1 . $

Re: please Perl help...

2011-09-03 Thread Parag Kalra
use strict; use warnings; while(){ my $num = $. - 1; s/\d+/$num/ if /\w+\s+\d+\s+\w/; print $_; } __DATA__ charith 4 matara saman 8 kandy andrew 9 colombo dilshan 3 galle shanil 10 jafna Parag On Fri, Sep 2, 2011 at 8:42 PM, Charith LokuBogahawatta wrote: > Hi All, > > I'm new to

Re: please Perl help...

2011-09-03 Thread Shlomi Fish
ׁHi Charith, On Fri, 2 Sep 2011 20:42:31 -0700 (PDT) Charith LokuBogahawatta wrote: > Hi All, > > I'm new to this group also for perl but nowadays I working around with > Perl and I need some help. this my first thread please anyone can help > me? > > i have a file contains the following data.

Re: Please put the sources of the book "Modern Perl" under CC-by-sa

2011-03-03 Thread Shlomi Fish
Dear chromatic, I now realise that this E-mail was phrased in a very impolite manner. I did not intend that to be the case, but that's how I often tend to write my emails (it's one of my many faults that I'm investing time in remedying, but it will take me some time to fully resolve.). I hope y

Re: Please suggest a good book on perl

2010-10-24 Thread Shlomi Fish
On Saturday 23 October 2010 23:30:43 Parag Kalra wrote: > Hey All, > > Just finished reading 'intermediate perl' Enjoyed it as much as I > enjoyed the book 'learning perl' > > Thanks Randal, Tom & All > > Please now suggest another must read nook on perl. > I have some book recommendations on

Re: Please suggest a good book on perl

2010-10-23 Thread David Christensen
Parag Kalra wrote: > Just finished reading 'intermediate perl' Enjoyed it as much as I > enjoyed the book 'learning perl' > Thanks Randal, Tom & All > Please now suggest another must read nook on perl. I'd suggest that you start writing Perl code, with two books at your side: 1. Programming Per

Re: Please suggest a good book on perl

2010-10-23 Thread Jeff Peng
> Hey All, > > Just finished reading 'intermediate perl' Enjoyed it as much as I > enjoyed the book 'learning perl' > > Thanks Randal, Tom & All > > Please now suggest another must read nook on perl. > why not "network programming with Perl"? This book will give you much more knowledge than perl i

Re: Please suggest a good book on perl

2010-10-23 Thread Brian Fraser
Nope. Just Modern Perl, by chromatic; It's not published yet, thus me linking to the draft (I had never heard of Modern Perl Programming, but reading a couple of reviews on Google haven't given me the best of impressions). Brian.

Re: Please suggest a good book on perl

2010-10-23 Thread Parag Kalra
Ok. Are you referring to the one by Michael Saltzman Btw I would also like to thank brain d foy for such a good book 'learning perl' Sent from my iPhone On Oct 23, 2010, at 3:00 PM, Brian Fraser wrote: I was on your exact same situation a couple of weeks ago. Personally, I tackled Programming

Re: Please suggest a good book on perl

2010-10-23 Thread Brian Fraser
I was on your exact same situation a couple of weeks ago. Personally, I tackled Programming Perl[0], but maybe you'd prefer reading chromatic's Modern Perl[1]; Both require some previous knowledge -- Knowledge which you gained by reading the Llama and the Alpaca, mostly (I'm still reading Modern Pe

Re: Please explain the one string

2010-07-13 Thread Chas. Owens
On Mon, Jul 12, 2010 at 15:21, redtigra wrote: > Rob, > > GREAT thanks, your explanantion is very detailed and very clear. Looks > like I don't have a clear understanding regarding -n option, so I have > something for reading for the evening :) snip When trying to understand what Perl is doing be

Re: Please explain the one string

2010-07-13 Thread redtigra
Rob, GREAT thanks, your explanantion is very detailed and very clear. Looks like I don't have a clear understanding regarding -n option, so I have something for reading for the evening :) > If you > want to have a decent solution that others can understand and read put this > in a small script wh

Re: Please explain the one string

2010-07-12 Thread Rob Coops
On Sun, Jul 11, 2010 at 10:45 PM, redtigra wrote: > Folks, > > would you please explain me one string of code I could node > understand? > Here it is: > $ perl -ne 'chomp; $fmt = "%-10s %-10s %s\n"; > > if ($ARGV eq "name") {$x{$_}++} > > elsif (/^ALTER TABLE (.*)/ and defin

Re: Please excuse the NOOB question - but I guess since this is a perl.beginners group

2010-02-26 Thread Rene Schickbauer
GlenM wrote: Okay; I am sure that someone out there has done this before - I *think* I am on the right track. I have a directory full of emails. What I would like to do is read each file in, then parse them into a CSV style file. Example: #!/usr/bin/perl use warnings; use strict; open FILE

Re: Please excuse the NOOB question - but I guess since this is a perl.beginners group

2010-02-26 Thread Uri Guttman
glen, you posted this to comp.lang.perl.misc and got plenty of help there. again, your subject line has nothing to do with the actual request. please learn to use these resources properly with good subjects (state the technical problem, not a begging for help). also why did you ask for more help

Re: Please remove all references in mail archive

2010-01-07 Thread fudmer rieley
I can't get (BIMMET Global Feudal Lords): Google, Skype, Yahoo, Microsoft, etc. off Mozilla, Firefox. In fact I can't get Skype off any machine I install it on, nor out of Mozilla, no matter how hard I try. If somebody has a perl script, other know how, that will allow to remove the presence o

Re: Please remove all references in mail archive

2010-01-06 Thread Shawn H Corey
jm wrote: > > if this person really believes he has any expectation of privacy regarding > any aspect of the internet, then i have some prime swampland in the sahara > i'd love to sell him > > > good luck with that Please don't feed the trolls. -- Just my 0.0002 million dollars worth,

Re: Please remove all references in mail archive

2010-01-06 Thread jm
if this person really believes he has any expectation of privacy regarding any aspect of the internet, then i have some prime swampland in the sahara i'd love to sell him good luck with that On Tue, Jan 5, 2010 at 11:16 PM, jay taylor wrote: > Hello, > I am reggie kogulan. > > Please remove

Re: Please help to load script from secure server HTTPS in Safari and Opera

2010-01-04 Thread Steve Bertrand
Jeremiah Foster wrote: > On Jan 5, 2010, at 1:03, Steve Bertrand wrote: > >> Jeremiah Foster wrote: >>> On Jan 4, 2010, at 11:49, Simphiwe Mkhize wrote: >>> Good new year Can any one please help me to solve problem with Safari, Google Chrome and Opera. my script has to loa

Re: Please help to load script from secure server HTTPS in Safari and Opera

2010-01-04 Thread Jeremiah Foster
On Jan 5, 2010, at 1:03, Steve Bertrand wrote: > Jeremiah Foster wrote: >> On Jan 4, 2010, at 11:49, Simphiwe Mkhize wrote: >> >>> Good new year >>> >>> Can any one please help me to solve problem with Safari, Google Chrome and >>> Opera. my script has to load from secure server HTTPS for

Re: Please help to load script from secure server HTTPS in Safari and Opera

2010-01-04 Thread Steve Bertrand
Jeremiah Foster wrote: > On Jan 4, 2010, at 11:49, Simphiwe Mkhize wrote: > >> Good new year >> >> Can any one please help me to solve problem with Safari, Google Chrome and >> Opera. my script has to load from secure server HTTPS for security reason. >> It works fine from IE and Firefox. >>

Re: Please help to load script from secure server HTTPS in Safari and Opera

2010-01-04 Thread Jeremiah Foster
On Jan 4, 2010, at 11:49, Simphiwe Mkhize wrote: > Good new year > > Can any one please help me to solve problem with Safari, Google Chrome and > Opera. my script has to load from secure server HTTPS for security reason. > It works fine from IE and Firefox. > > Here are the errors I get >

Re: Please help me recover my Perl script.

2009-12-27 Thread Owen
>> >> What does it say in a hex editor? >> > > > # hexdump Test.pl > 000 > * > 0001090 > 0001094 I would take a guess and say don't waste anymore time on it. Put your energies in rewriting the program -- Owen -- To unsubscribe, e

Re: Please help me recover my Perl script.

2009-12-27 Thread Parag Kalra
> > What does it say in a hex editor? > # hexdump Test.pl 000 * 0001090 0001094 Cheers, Parag

Re: Please help me recover my Perl script.

2009-12-27 Thread Owen
>> >> I think it's from UTF-16 to UTF-8. >> >> > > That doesn't seem to work. > > When I try to view my roasted file through 'less' command I get > following > output: > > # less Test.pl > *"Test.pl" may be a binary file. See it anyway? * > > Is there a way I can convert this binary file to its i

Re: Please help me recover my Perl script.

2009-12-27 Thread Parag Kalra
> > I think it's from UTF-16 to UTF-8. > > That doesn't seem to work. When I try to view my roasted file through 'less' command I get following output: # less Test.pl *"Test.pl" may be a binary file. See it anyway? * Is there a way I can convert this binary file to its initial readable state.

Re: Please help me recover my Perl script.

2009-12-27 Thread Shlomi Fish
On Sunday 27 Dec 2009 12:19:48 Shlomi Fish wrote: > On Friday 25 Dec 2009 09:07:53 Parag Kalra wrote: > > Can anyone please let me know how to use 'iconv' command with Perl > > script. > > > > I mean what should be my input and output file format while using 'iconv' > > with a Perl script which wil

Re: Please help me recover my Perl script.

2009-12-27 Thread Shlomi Fish
On Friday 25 Dec 2009 09:07:53 Parag Kalra wrote: > Can anyone please let me know how to use 'iconv' command with Perl script. > > I mean what should be my input and output file format while using 'iconv' > with a Perl script which will help me recover my Perl script. > I think it's from UTF-16

Re: Please help me recover my Perl script.

2009-12-25 Thread Randal L. Schwartz
> "Parag" == Parag Kalra writes: Parag> I was coding my Perl script in Notepad++ editor and it was on verge of Parag> completion. Parag> All of a sudden my machine rebooted. And after that I found all my data Parag> lost. It is containing series of 'NUL' characters. Welcome to Windows. Per

Re: Please help me recover my Perl script.

2009-12-24 Thread Parag Kalra
Can anyone please let me know how to use 'iconv' command with Perl script. I mean what should be my input and output file format while using 'iconv' with a Perl script which will help me recover my Perl script. Hey BTW Merry Christmas to all. :) Cheers, Parag On Fri, Dec 25, 2009 at 11:05 AM

Re: Please Help Me!

2009-07-25 Thread Chas. Owens
On Sat, Jul 25, 2009 at 05:48, Shawn H. Corey wrote: > Umar Draz wrote: >> >> As you can see its not works because there is no space after the word is >> So would you please help me how to solve this. >> > > Change the word boundary, \b, to a not-digit, \D. snip That will cause "0300-1234567" to f

Re: Please Help Me!

2009-07-25 Thread Shawn H. Corey
Umar Draz wrote: As you can see its not works because there is no space after the word is So would you please help me how to solve this. Change the word boundary, \b, to a not-digit, \D. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and comm

Re: Please Help me

2009-07-24 Thread Steve Bertrand
Umar Draz wrote: > I want to print all mobile from above string. Mobile code always start > from 03. and not more than 4 digits. > So here I have use this regular expression. > while($str =~ /(\b(0([3](\d\d)))+[-]+\d{7}|\ b(0([3](\d\d)))+\d{7})/g){   >      print "Your Mobile No. is " . $1 . "\n

Re: PLEASE STOP SENDING MIALS

2009-07-24 Thread Randal L. Schwartz
> ""Shawn" == "Shawn H Corey" writes: "Shawn> Alok Alan wrote: >> "Shawn> There is nothing that can be done about mials but if you don't want emails, "Shawn> see: http://lists.cpan.org/showlist.cgi?name=beginners I don't want any Mials either. I don't know what they are, but they can't b

Re: PLEASE STOP SENDING MIALS

2009-07-23 Thread Shawn H. Corey
Alok Alan wrote: There is nothing that can be done about mials but if you don't want emails, see: http://lists.cpan.org/showlist.cgi?name=beginners -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding

RE: Please, I need help!!!

2009-06-13 Thread Wagner, David --- Senior Programmer Analyst --- CFS
> -Original Message- > From: Phillip [mailto:fibbe...@gmx.net] > Sent: Thursday, June 11, 2009 12:00 > To: beginners@perl.org > Subject: Please, I need help!!! > > Hallo @ all, > > i am new in this domain(perlscript) and i have a question.i have a > array,i sort it,i get the last eleme

Re: Please, I need help!!!

2009-06-12 Thread John W. Krahn
Phillip wrote: Hallo @ all, Hello, i am new in this domain(perlscript) and i have a question.i have a array,i sort it,i get the last element of the array but i want to get the next element after this one.how can i do this? for example: $arr1=("6,3,8,1") --->>my last element is 1 and mark

Re: Please, I need help!!!

2009-06-12 Thread Jenda Krynicky
From: Jim Gibson > On 6/11/09 Thu Jun 11, 2009 11:00 AM, "Phillip" > scribbled: > > > Hallo @ all, > > > > i am new in this domain(perlscript) and i have a question.i have a > > array,i sort it,i get the last element of the array but i want to get > > the next element after this one.how can i

Re: Please, I need help!!!

2009-06-12 Thread Jim Gibson
On 6/11/09 Thu Jun 11, 2009 11:00 AM, "Phillip" scribbled: > Hallo @ all, > > i am new in this domain(perlscript) and i have a question.i have a > array,i sort it,i get the last element of the array but i want to get > the next element after this one.how can i do this? There is a language cal

Re: please explain the anonymous sub usage in one of the article from stonehenge in detail for me

2008-11-07 Thread Richard Lee
Jenda Krynicky wrote: If we name the subroutine the code would look like this: sub read_from_stdin { return ; } ... $next = non_blank(\&read_from_stdin); that is again the non_blank() would receive a reference to a subroutine that reads one line from STDIN whenever called. (actually this is

Re: please explain the anonymous sub usage in one of the article from stonehenge in detail for me

2008-11-07 Thread Jenda Krynicky
From: Richard Lee <[EMAIL PROTECTED]> > http://www.stonehenge.com/merlyn/UnixReview/col08.html > > From above article, I am not fully understanding what's going on on > below code. > > 1)is there any difference in $next = $non_blank() and > $next=$non_blank( sub{ }) in terms of funcaitonalit

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
Chas. Owens wrote: On Tue, Oct 14, 2008 at 02:15, Richard Lee <[EMAIL PROTECTED]> wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. snip I found your

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
Chas. Owens wrote: On Tue, Oct 14, 2008 at 02:15, Richard Lee <[EMAIL PROTECTED]> wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. snip I found your

Re: Please help me w/ my sub

2008-10-14 Thread Chas. Owens
On Tue, Oct 14, 2008 at 02:15, Richard Lee <[EMAIL PROTECTED]> wrote: > below sub works fine except the line where key is default. > Instead of printing out PCMU only once, it's printing it out 40 times > randomly.. > Trying to figure out what I did wrong. snip I found your code to be very odd. Y

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
John, I think this is now fixed. Still looking to make sure its covering all basis.. sub codec_list { #my @codec_d = qw/0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 # 28 29 30 31 32 33 34 35--71 72--76 77--95 96--127/; my @codec_d = qw

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
John W. Krahn wrote: Richard Lee wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. Please leave me a feedback. thank you. 156 time(s) Codec(s) : unassign

Re: Please help me w/ my sub

2008-10-14 Thread John W. Krahn
Richard Lee wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. Please leave me a feedback. thank you. 156 time(s) Codec(s) : unassigned_38 185 time(s) Cod

Re: Please help critcize and shorten my sub code

2008-05-11 Thread Rob Dixon
Jenda Krynicky wrote: > > Only the loops that need to be labeled should be labeled. I agree. Apart from your spelling of 'labelled' :) Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Please help critcize and shorten my sub code

2008-05-11 Thread Jenda Krynicky
From: Peter Scott <[EMAIL PROTECTED]> > On Sun, 11 May 2008 02:05:06 +0200, Jenda Krynicky wrote: > > You do not need the label unless you need to jump out of some other > > loop than the innermost. In this case there are no nested loops so it > > would probably be better to skip the label. > >

Re: Please help critcize and shorten my sub code

2008-05-11 Thread Peter Scott
On Sun, 11 May 2008 02:05:06 +0200, Jenda Krynicky wrote: > You do not need the label unless you need to jump out of some other > loop than the innermost. In this case there are no nested loops so it > would probably be better to skip the label. While I personally program the way you suggest, ta

Re: Please help critcize and shorten my sub code

2008-05-10 Thread Richard Lee
Jenda Krynicky wrote: From: Richard Lee <[EMAIL PROTECTED]> Jenda Krynicky wrote: You may do something like this: for my $wanted ( [outsideroute_group_m => route_name => \$routename, route_group_id => \$routegroupid], [outsideroute_trunk_m => route_group_id => \$routeg

Re: Please help critcize and shorten my sub code

2008-05-10 Thread Jenda Krynicky
From: Richard Lee <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > You may do something like this: > > > > for my $wanted ( > > [outsideroute_group_m => route_name => \$routename, > > route_group_id => \$routegroupid], > > [outsideroute_trunk_m => route_group_id => \$routegroupid,

Re: Please help critcize and shorten my sub code

2008-05-10 Thread Richard Lee
Jenda Krynicky wrote: From: Richard Lee <[EMAIL PROTECTED]> I dont know how to go through the array over and over again pending on my previous search so I ended up writing it like below which works.. but looks really really inefficient.. sub dd_fact { my $routename

Re: Please help critcize and shorten my sub code

2008-05-10 Thread Jenda Krynicky
From: Richard Lee <[EMAIL PROTECTED]> > I dont know how to go through the array over and over again pending on > my previous search so I ended up writing it like below which works.. but > looks really really > inefficient.. > > > sub dd_fact { > my $routename = shift; >

Re: Please let me know where can I find practice exercises

2008-04-11 Thread hemanth
On Apr 11, 11:46 am, [EMAIL PROTECTED] (Vijayshree) wrote: > On Apr 10, 2:56 pm, [EMAIL PROTECTED] (Hemanth) wrote: > > > Hi, > > > I am currently learning perl programming. Please help me by giving > > some practice exercises or direct me to the site where i can find > > them. > > > Thanks in Adva

Re: Please let me know where can I find practice exercises

2008-04-11 Thread Vijayshree
On Apr 10, 2:56 pm, [EMAIL PROTECTED] (Hemanth) wrote: > Hi, > > I am currently learning perl programming. Please help me by giving > some practice exercises or direct me to the site where i can find > them. > > Thanks in Advance! > > Hemanth Hi Hemanth, You can solve list of questions from site

Re: Please let me know where can I find practice exercises

2008-04-10 Thread J. Peng
Learning Perl has exercises after each charpter. On 4/10/08, hemanth <[EMAIL PROTECTED]> wrote: > Hi, > > I am currently learning perl programming. Please help me by giving > some practice exercises or direct me to the site where i can find > them. > > Thanks in Advance! > > Hemanth > > > -- > To

Re: Please let me know where can I find practice exercises

2008-04-10 Thread Chas. Owens
On Thu, Apr 10, 2008 at 5:56 AM, hemanth <[EMAIL PROTECTED]> wrote: > Hi, > > I am currently learning perl programming. Please help me by giving > some practice exercises or direct me to the site where i can find > them. snip A good starting exercise is reimplementing various UNIX utilities in

Re: Please explain @{$y}

2008-01-24 Thread Chas. Owens
On Jan 24, 2008 7:49 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: snip > >> Of course. Thanks Chas. I think the docs could do with a tweak here. > > > > They seem fine to me: > > > > from perldoc strict > >"strict refs" > > This generates a runtime error if you use symbolic referen

Re: Please explain @{$y}

2008-01-24 Thread Rob Dixon
Chas. Owens wrote: > On Jan 23, 2008 10:29 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: >> Chas. Owens wrote: On Jan 23, 2008 10:07 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: Along these lines, can someone explain to me why use strict 'vars'; my $name = 'data'; print foreach @$name; p

Re: Please explain @{$y}

2008-01-23 Thread Gunnar Hjalmarsson
Chas. Owens wrote: Gunnar Hjalmarsson wrote: Chas. Owens wrote: On Jan 23, 2008 10:07 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: Along these lines, can someone explain to me why use strict 'vars'; my $name = 'data'; print foreach @$name; produces no error, when use strict 'vars';

Re: Please explain @{$y}

2008-01-23 Thread Chas. Owens
On Jan 23, 2008 10:34 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: snip > >>use strict 'vars'; > >>my $name = 'data'; > >>print foreach @$name; snip > Don't think so, Chas. It's > > use strict 'refs'; > > that captures symbolic references, not 'vars'. snip He was referring t

Re: Please explain @{$y}

2008-01-23 Thread Chas. Owens
On Jan 23, 2008 10:29 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Chas. Owens wrote: > > > > On Jan 23, 2008 10:07 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > >> > >> Along these lines, can someone explain to me why > >> > >>use strict 'vars'; > >>my $name = 'data'; > >>print foreach @

  1   2   3   >