Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5
Thanks a lot Gautam S Desai On Sun, Sep 8, 2019 at 6:39 PM Mike wrote: > > It's probably best if you write a short script > that reads a __DATA__ section of data. > Then tell us what it does and what you expected > it to do. > > Off hand I don't see anything wrong with your regex, > but I don't know what you expect it to do. > > > Mike > > > On 9/8/2019 4:34 PM, Jim Gibson wrote: > > On Sep 8, 2019, at 1:30 PM, Gautam Desai > wrote: > >> Do you guys have any pointers ? > > $t =~ m{ > > ( # capture matched number in $1 > > \d* # match zero or more decimal digits > > [05] # followed by a '0' or '5' > > ) # end of capture > > (?: # followed by either: > > \D# a non-digit > > | # or > > $ # the end of the string > > ) > > }x > > > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >
Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5
> On Sep 8, 2019, at 6:36 PM, Olivier wrote: > > Jim Gibson writes: > >> On Sep 8, 2019, at 3:39 PM, Mike wrote: >>> >>> >>> It's probably best if you write a short script >>> that reads a __DATA__ section of data. >>> Then tell us what it does and what you expected >>> it to do. >>> >>> Off hand I don't see anything wrong with your regex, >>> but I don't know what you expect it to do. >>> >> >> I expect it to return a positive value if $t contains a number anywhere >> within it and put that number in the $1 capture variable. > > Well, that is not what is in your regex: you look for a decimal number > ending with 0 or 5, and it must be the last number of the line. > > What about something simple like: > >/(\d*[05])\D*$/ I prefer the explicit (?:…|…) structure that tells the reader that an alternate expression is being used. Also, the “zero or more” * operator can be very slow for long strings. > > The Regex Coach is your friend (and works well under wine). > > It alsways help to present with some sample data. If you want to use this regex, then you should test it yourself. I did. > > Best regards, > > Olivier > >>> >>> Mike >>> >>> >>> On 9/8/2019 4:34 PM, Jim Gibson wrote: On Sep 8, 2019, at 1:30 PM, Gautam Desai wrote: > Do you guys have any pointers ? $t =~ m{ ( # capture matched number in $1 \d* # match zero or more decimal digits [05] # followed by a '0' or '5' ) # end of capture (?: # followed by either: \D# a non-digit | # or $ # the end of the string ) }x >>> >>> -- >>> To unsubscribe, e-mail: beginners-unsubscr...@perl.org >>> For additional commands, e-mail: beginners-h...@perl.org >>> http://learn.perl.org/ >>> >>> >> >> Jim Gibson >> j...@gibson.org > > -- > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ Jim Gibson j...@gibson.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5
Jim Gibson writes: > On Sep 8, 2019, at 3:39 PM, Mike wrote: >> >> >> It's probably best if you write a short script >> that reads a __DATA__ section of data. >> Then tell us what it does and what you expected >> it to do. >> >> Off hand I don't see anything wrong with your regex, >> but I don't know what you expect it to do. >> > > I expect it to return a positive value if $t contains a number anywhere > within it and put that number in the $1 capture variable. Well, that is not what is in your regex: you look for a decimal number ending with 0 or 5, and it must be the last number of the line. What about something simple like: /(\d*[05])\D*$/ The Regex Coach is your friend (and works well under wine). It alsways help to present with some sample data. Best regards, Olivier >> >> Mike >> >> >> On 9/8/2019 4:34 PM, Jim Gibson wrote: >>> On Sep 8, 2019, at 1:30 PM, Gautam Desai >>> wrote: Do you guys have any pointers ? >>> $t =~ m{ >>> ( # capture matched number in $1 >>> \d* # match zero or more decimal digits >>> [05] # followed by a '0' or '5' >>> ) # end of capture >>> (?: # followed by either: >>> \D# a non-digit >>> | # or >>> $ # the end of the string >>> ) >>> }x >>> >> >> -- >> To unsubscribe, e-mail: beginners-unsubscr...@perl.org >> For additional commands, e-mail: beginners-h...@perl.org >> http://learn.perl.org/ >> >> > > Jim Gibson > j...@gibson.org -- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5
On Sep 8, 2019, at 3:39 PM, Mike wrote: > > > It's probably best if you write a short script > that reads a __DATA__ section of data. > Then tell us what it does and what you expected > it to do. > > Off hand I don't see anything wrong with your regex, > but I don't know what you expect it to do. > I expect it to return a positive value if $t contains a number anywhere within it and put that number in the $1 capture variable. > > Mike > > > On 9/8/2019 4:34 PM, Jim Gibson wrote: >> On Sep 8, 2019, at 1:30 PM, Gautam Desai >> wrote: >>> Do you guys have any pointers ? >> $t =~ m{ >> ( # capture matched number in $1 >>\d* # match zero or more decimal digits >>[05] # followed by a '0' or '5' >> ) # end of capture >> (?: # followed by either: >>\D# a non-digit >> | # or >>$ # the end of the string >> ) >> }x >> > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > Jim Gibson j...@gibson.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5
It's probably best if you write a short script that reads a __DATA__ section of data. Then tell us what it does and what you expected it to do. Off hand I don't see anything wrong with your regex, but I don't know what you expect it to do. Mike On 9/8/2019 4:34 PM, Jim Gibson wrote: On Sep 8, 2019, at 1:30 PM, Gautam Desai wrote: Do you guys have any pointers ? $t =~ m{ ( # capture matched number in $1 \d* # match zero or more decimal digits [05] # followed by a '0' or '5' ) # end of capture (?: # followed by either: \D# a non-digit | # or $ # the end of the string ) }x -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5
On Sep 8, 2019, at 1:30 PM, Gautam Desai wrote: > > Do you guys have any pointers ? $t =~ m{ ( # capture matched number in $1 \d* # match zero or more decimal digits [05] # followed by a '0' or '5' ) # end of capture (?: # followed by either: \D# a non-digit | # or $ # the end of the string ) }x -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5
Do you guys have any pointers ? Thanks Gautam S Desai kidsforchess.org https://www.facebook.com/kidsforchess.suwanee.9 https://www.21stcenturyleaders.org/youth-ambassador-starts-nonprofit-donates-to-21cl/
RE: Hi
WOW!! I think it worked, I just received an e-mail confirming the removal of my e-mail!! Good by everyone :) Regards; -Original Message- From: Torqued [mailto:torque.in...@gmail.com] Sent: Monday, January 14, 2013 8:45 PM To: Lou Pereira Cc: Kristin Nielsen; beginners@perl.org Subject: Re: Hi Regards... /omps On 14-Jan-2013, at 11:12 PM, Lou Pereira louis.pere...@ptalc.com wrote: OK, So I performed you step 3 again last Thursday, but I am still receiving e-mails??? Any more suggestions? May be the group doesn't want you to leave. ;) Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:justkris...@gmail.com] On Behalf Of Kristin Nielsen Sent: Friday, January 11, 2013 9:14 AM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi If you do not give data for troubleshooting, there is no good way to help. See step 3: 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. I am, c. Kristin Sent while galavanting. On Jan 11, 2013, at 3:23 AM, Lou Pereira louis.pere...@ptalc.com wrote: For the past year I have exhausted all options of e-mail format to opt out, including your recommendations to no avail. I must say that over 10 years I have been involved with different e-mail lists and tech groups, but never had such as poor service as this group. Any other ideas would be appreciated? Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:kris...@justkristin.com] Sent: Thursday, January 10, 2013 6:50 PM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi Lou - Klamerus' frustration is not completely unwarranted. I answered that question in my reply to the list - did you read it? If not, there are three steps to take - fewer if you are successful. 1. Start an email from the account with which you subscribed to the list. You MUST send your unsubscribe request from the email address by which list mail is being rec'd. 2. Send a simple blank email from the account mentioned in step #1 to beginners-unsubscr...@perl.org 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. There you go. I am, c., Kristin P. S. I take quite to heart the belittling attitude found on so many tech lists. Bad attitude doesn't work from either direction, and yes, delivery matters. This is supposed to be a cooperative educational community, is it not? Sure, we should all RTFM, but some of us who have been forced to learn-or-get-laid-off simply lack the formal training to know which term to use in our search, or even to know which PERLDOC to read, have been shamed into silence by cruel responses. I am far beyond that now, but I remember it well. Furthermore, this list contains quite a few for whom English is not a first language. I am grateful to everyone here for being on the list and helping those who come to it for assistance. We all get frustrated with simplistic or repetitive questions, and people who don't even try should be told to try first, but very little besides a bully's ego is helped by mean replies. No? Thanks again, all of you, really. On Jan 10, 2013, at 3:36 PM, Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http
RE: Hi
OK, So I performed you step 3 again last Thursday, but I am still receiving e-mails??? Any more suggestions? Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:justkris...@gmail.com] On Behalf Of Kristin Nielsen Sent: Friday, January 11, 2013 9:14 AM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi If you do not give data for troubleshooting, there is no good way to help. See step 3: 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. I am, c. Kristin Sent while galavanting. On Jan 11, 2013, at 3:23 AM, Lou Pereira louis.pere...@ptalc.com wrote: For the past year I have exhausted all options of e-mail format to opt out, including your recommendations to no avail. I must say that over 10 years I have been involved with different e-mail lists and tech groups, but never had such as poor service as this group. Any other ideas would be appreciated? Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:kris...@justkristin.com] Sent: Thursday, January 10, 2013 6:50 PM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi Lou - Klamerus' frustration is not completely unwarranted. I answered that question in my reply to the list - did you read it? If not, there are three steps to take - fewer if you are successful. 1. Start an email from the account with which you subscribed to the list. You MUST send your unsubscribe request from the email address by which list mail is being rec'd. 2. Send a simple blank email from the account mentioned in step #1 to beginners-unsubscr...@perl.org 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. There you go. I am, c., Kristin P. S. I take quite to heart the belittling attitude found on so many tech lists. Bad attitude doesn't work from either direction, and yes, delivery matters. This is supposed to be a cooperative educational community, is it not? Sure, we should all RTFM, but some of us who have been forced to learn-or-get-laid-off simply lack the formal training to know which term to use in our search, or even to know which PERLDOC to read, have been shamed into silence by cruel responses. I am far beyond that now, but I remember it well. Furthermore, this list contains quite a few for whom English is not a first language. I am grateful to everyone here for being on the list and helping those who come to it for assistance. We all get frustrated with simplistic or repetitive questions, and people who don't even try should be told to try first, but very little besides a bully's ego is helped by mean replies. No? Thanks again, all of you, really. On Jan 10, 2013, at 3:36 PM, Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi
Regards... /omps On 14-Jan-2013, at 11:12 PM, Lou Pereira louis.pere...@ptalc.com wrote: OK, So I performed you step 3 again last Thursday, but I am still receiving e-mails??? Any more suggestions? May be the group doesn't want you to leave. ;) Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:justkris...@gmail.com] On Behalf Of Kristin Nielsen Sent: Friday, January 11, 2013 9:14 AM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi If you do not give data for troubleshooting, there is no good way to help. See step 3: 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. I am, c. Kristin Sent while galavanting. On Jan 11, 2013, at 3:23 AM, Lou Pereira louis.pere...@ptalc.com wrote: For the past year I have exhausted all options of e-mail format to opt out, including your recommendations to no avail. I must say that over 10 years I have been involved with different e-mail lists and tech groups, but never had such as poor service as this group. Any other ideas would be appreciated? Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:kris...@justkristin.com] Sent: Thursday, January 10, 2013 6:50 PM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi Lou - Klamerus' frustration is not completely unwarranted. I answered that question in my reply to the list - did you read it? If not, there are three steps to take - fewer if you are successful. 1. Start an email from the account with which you subscribed to the list. You MUST send your unsubscribe request from the email address by which list mail is being rec'd. 2. Send a simple blank email from the account mentioned in step #1 to beginners-unsubscr...@perl.org 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. There you go. I am, c., Kristin P. S. I take quite to heart the belittling attitude found on so many tech lists. Bad attitude doesn't work from either direction, and yes, delivery matters. This is supposed to be a cooperative educational community, is it not? Sure, we should all RTFM, but some of us who have been forced to learn-or-get-laid-off simply lack the formal training to know which term to use in our search, or even to know which PERLDOC to read, have been shamed into silence by cruel responses. I am far beyond that now, but I remember it well. Furthermore, this list contains quite a few for whom English is not a first language. I am grateful to everyone here for being on the list and helping those who come to it for assistance. We all get frustrated with simplistic or repetitive questions, and people who don't even try should be told to try first, but very little besides a bully's ego is helped by mean replies. No? Thanks again, all of you, really. On Jan 10, 2013, at 3:36 PM, Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org
Re: Hi
Hi Lou, You might want to make sure you're sending your email in plain text. Check your settings, if you're using Rich Text or HTML to format the email it might screw the pooch for you. That's a real old problem, but this might be real old software running this list. Also, I found this on the faq page for this list: Who owns this list? Who do I complain to? John SJ Anderson owns the beginners list. You can contact him at geneh...@genehack.org. http://learn.perl.org/faq/beginners.html#owner Hopefully contacting them will help. If not, let us all know and I'll try and help you track down a solution to the problem. Kindest Regards, Bill Stephenson -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: Hi
For the past year I have exhausted all options of e-mail format to opt out, including your recommendations to no avail. I must say that over 10 years I have been involved with different e-mail lists and tech groups, but never had such as poor service as this group. Any other ideas would be appreciated? Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:kris...@justkristin.com] Sent: Thursday, January 10, 2013 6:50 PM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi Lou - Klamerus' frustration is not completely unwarranted. I answered that question in my reply to the list - did you read it? If not, there are three steps to take - fewer if you are successful. 1. Start an email from the account with which you subscribed to the list. You MUST send your unsubscribe request from the email address by which list mail is being rec'd. 2. Send a simple blank email from the account mentioned in step #1 to beginners-unsubscr...@perl.org 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. There you go. I am, c., Kristin P. S. I take quite to heart the belittling attitude found on so many tech lists. Bad attitude doesn't work from either direction, and yes, delivery matters. This is supposed to be a cooperative educational community, is it not? Sure, we should all RTFM, but some of us who have been forced to learn-or-get-laid-off simply lack the formal training to know which term to use in our search, or even to know which PERLDOC to read, have been shamed into silence by cruel responses. I am far beyond that now, but I remember it well. Furthermore, this list contains quite a few for whom English is not a first language. I am grateful to everyone here for being on the list and helping those who come to it for assistance. We all get frustrated with simplistic or repetitive questions, and people who don't even try should be told to try first, but very little besides a bully's ego is helped by mean replies. No? Thanks again, all of you, really. On Jan 10, 2013, at 3:36 PM, Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ On Fri, Jan 11, 2013 at 5:23 AM, Lou Pereira louis.pere...@ptalc.com wrote: For the past year I have exhausted all options of e-mail format to opt out, including your recommendations to no avail. I must say that over 10 years I have been involved with different e-mail lists and tech groups, but never had such as poor service as this group. Any other ideas would be appreciated? Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:kris...@justkristin.com] Sent: Thursday, January 10, 2013 6:50 PM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi Lou - Klamerus' frustration is not completely unwarranted. I answered that question in my reply to the list - did you read it? If not, there are three steps to take - fewer if you are successful. 1. Start an email from the account with which you subscribed to the list. You MUST send your unsubscribe request from the email address by which list mail is being rec'd. 2. Send a simple blank email from the account mentioned in step #1 to beginners-unsubscr...@perl.org 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. There you go. I am, c., Kristin P. S. I take quite to heart the belittling attitude found on so many tech lists. Bad attitude doesn't work from either direction, and yes, delivery matters. This is supposed to be a cooperative educational community, is it not? Sure, we should all RTFM, but some of us who have been forced to learn-or-get-laid-off simply lack the formal training to know which term to use in our search, or even to know which PERLDOC to read, have been shamed into silence by cruel responses. I am far beyond that now, but I remember it well. Furthermore, this list contains quite a few for whom English is not a first language. I am grateful to everyone here for being on the list and helping those who come to it for assistance. We all get frustrated with simplistic or repetitive questions, and people who don't even try should be told to try first, but very little besides a bully's ego is helped by mean replies. No? Thanks again, all of you, really. On Jan 10, 2013, at 3:36 PM, Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- - Chicago Hal Wigoda -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi
If you do not give data for troubleshooting, there is no good way to help. See step 3: 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. I am, c. Kristin Sent while galavanting. On Jan 11, 2013, at 3:23 AM, Lou Pereira louis.pere...@ptalc.com wrote: For the past year I have exhausted all options of e-mail format to opt out, including your recommendations to no avail. I must say that over 10 years I have been involved with different e-mail lists and tech groups, but never had such as poor service as this group. Any other ideas would be appreciated? Regards; Lou Pereira C: (973) 670-6821 mailto:louis.pere...@ptalc.com -Original Message- From: Kristin Nielsen [mailto:kris...@justkristin.com] Sent: Thursday, January 10, 2013 6:50 PM To: Lou Pereira Cc: beginners@perl.org Subject: Re: Hi Lou - Klamerus' frustration is not completely unwarranted. I answered that question in my reply to the list - did you read it? If not, there are three steps to take - fewer if you are successful. 1. Start an email from the account with which you subscribed to the list. You MUST send your unsubscribe request from the email address by which list mail is being rec'd. 2. Send a simple blank email from the account mentioned in step #1 to beginners-unsubscr...@perl.org 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. There you go. I am, c., Kristin P. S. I take quite to heart the belittling attitude found on so many tech lists. Bad attitude doesn't work from either direction, and yes, delivery matters. This is supposed to be a cooperative educational community, is it not? Sure, we should all RTFM, but some of us who have been forced to learn-or-get-laid-off simply lack the formal training to know which term to use in our search, or even to know which PERLDOC to read, have been shamed into silence by cruel responses. I am far beyond that now, but I remember it well. Furthermore, this list contains quite a few for whom English is not a first language. I am grateful to everyone here for being on the list and helping those who come to it for assistance. We all get frustrated with simplistic or repetitive questions, and people who don't even try should be told to try first, but very little besides a bully's ego is helped by mean replies. No? Thanks again, all of you, really. On Jan 10, 2013, at 3:36 PM, Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Hi
Please help me how can I stop perl emails -- A.Bhanuchaitanya
Re: Hi
On Fri, 11 Jan 2013 00:34:14 +0530 bhanu chaitanya abbaraju bhanu.cha...@gmail.com wrote: Please help me how can I stop perl emails stop perl emails? Taking a guess that you mean you want to unsubscribe from this mailing list, each post from the list contains the following header: List-Unsubscribe: mailto:beginners-unsubscr...@perl.org Drop a blank email to that email address, and it should do the trick. Cheers Dave P -- David Precious (bigpresh) dav...@preshweb.co.uk http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedinwww.preshweb.co.uk/facebook www.preshweb.co.uk/cpanwww.preshweb.co.uk/github -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: Hi
Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: Hi
I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi
Lou - Klamerus' frustration is not completely unwarranted. I answered that question in my reply to the list - did you read it? If not, there are three steps to take - fewer if you are successful. 1. Start an email from the account with which you subscribed to the list. You MUST send your unsubscribe request from the email address by which list mail is being rec'd. 2. Send a simple blank email from the account mentioned in step #1 to beginners-unsubscr...@perl.org 3. If you are not unsubscribed, please add in your requests for further help (as simply saying it doesn't work does not help people troubleshoot, as we all know too well): a. the email - including headers - that you sent to beginners-unsubscr...@perl.org b. any replies you may have rec'd from the list server, especially if they contain denials or errors. There you go. I am, c., Kristin P. S. I take quite to heart the belittling attitude found on so many tech lists. Bad attitude doesn't work from either direction, and yes, delivery matters. This is supposed to be a cooperative educational community, is it not? Sure, we should all RTFM, but some of us who have been forced to learn-or-get-laid-off simply lack the formal training to know which term to use in our search, or even to know which PERLDOC to read, have been shamed into silence by cruel responses. I am far beyond that now, but I remember it well. Furthermore, this list contains quite a few for whom English is not a first language. I am grateful to everyone here for being on the list and helping those who come to it for assistance. We all get frustrated with simplistic or repetitive questions, and people who don't even try should be told to try first, but very little besides a bully's ego is helped by mean replies. No? Thanks again, all of you, really. On Jan 10, 2013, at 3:36 PM, Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? -Original Message- From: klamerus [mailto:klame...@earthlink.net] Sent: Thursday, January 10, 2013 4:10 PM To: 'bhanu chaitanya abbaraju'; beginners@perl.org Subject: RE: Hi Since you clearly don't know how mailing lists work I'm afraid that's not possible. -Original Message- From: bhanu chaitanya abbaraju [mailto:bhanu.cha...@gmail.com] Sent: Thursday, January 10, 2013 2:04 PM To: beginners@perl.org Subject: Hi Please help me how can I stop perl emails -- A.Bhanuchaitanya -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi
On Thu, 10 Jan 2013 18:36:07 -0500 Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? Send a email to: beginners-unsubscr...@perl.org You will get a confirmation reply. Press Reply and Send. You will get a final message saying good-bye. -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Fwd: Hi
Send a email to: beginners-unsubscr...@perl.org You will get a confirmation reply. Press Reply and Send. You will get a final message saying good-bye. Sometimes the address can be tricky - the FAQ http://learn.perl.org/faq/beginners.html says: Send mail to beginners-unsubscr...@perl.org, and wait for a response. Once you reply to the response, you'll be unsubscribed. If that doesn't work, find the email address which you are subscribed from and send an email like the following (let's assume your email is f...@bar.com): beginners-unsubscribe-foo=bar@perl.org -- a Andy Bach, afb...@gmail.com 608 658-1890 cell 608 261-5738 wk -- a Andy Bach, afb...@gmail.com 608 658-1890 cell 608 261-5738 wk
Re: Hi
于 2013-1-11 7:57, Shawn H Corey 写道: On Thu, 10 Jan 2013 18:36:07 -0500 Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? Send a email to: beginners-unsubscr...@perl.org You will get a confirmation reply. Press Reply and Send. You will get a final message saying good-bye. every replying messages have the foot info which includes the unsubscribing way: To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi
On Fri, 11 Jan 2013 09:46:20 +0800 Feng He fen...@nsbeta.info wrote: 于 2013-1-11 7:57, Shawn H Corey 写道: On Thu, 10 Jan 2013 18:36:07 -0500 Lou Pereira louis.pere...@ptalc.com wrote: I beg to differ regarding your comment. I have been trying to be removed from this list for over a year to no avail. So, all knowledge one, how do we remove ourselves from this mail list? Send a email to: beginners-unsubscr...@perl.org You will get a confirmation reply. Press Reply and Send. You will get a final message saying good-bye. every replying messages have the foot info which includes the unsubscribing way: To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ Yes but if you don't send the confirmation back, you don't get unsubscribed. -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Hi
Hi PLZ add me not the list Sent from Yahoo! Mail on Android
Hi
Please add me into the mailing list
Re: hi
There is a pm called Math::Combinatorics ( http://search.cpan.org/~allenday/Math-Combinatorics-0.09/lib/Math/Combinatorics.pm ) It is really helpful to get the combinations without repetition. Then you just need to process the results to get the output you need, I mean with the , and -. I hope this can help you. 2011/9/14 Brandon McCaig bamcc...@gmail.com On Wed, Sep 14, 2011 at 12:35 PM, Brandon McCaig bamcc...@gmail.com wrote: #/usr/bin/perl Silly me, I forgot the bang. --- a Wed Sep 14 12:38:40 2011 +++ b Wed Sep 14 12:38:46 2011 @@ -1,4 +1,4 @@ -#/usr/bin/perl +#!/usr/bin/perl use strict; use warnings; -- Brandon McCaig http://www.bamccaig.com/ bamcc...@gmail.com V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software http://www.castopulence.org/ bamcc...@castopulence.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
hi
Hi, I do have a doubt , Input: 1,2,3,4,5,6 output: 1-2,3-4,5-6 1-2,3-5,4-6 1-2,3-6,4-5 1-3,2-4,5-6 1-3,2-5,4-6 1-3,2-6,4-5 1-4,2-3,5-6 1-4,2-5,3-6 1-4,2-6,3-5 1-5,2-3,4-6 1-5,2-4,3-6 1-5,2-6,3-4 1-6,2-3,4-5 1-6,2-4,3-5 1-6,2-5,3-4 Can anyone help me in this -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: hi
On Tue, Sep 13, 2011 at 07:00:42AM -0700, pradeep wrote: Hi, I do have a doubt , Input: 1,2,3,4,5,6 output: 1-2,3-4,5-6 1-2,3-5,4-6 1-2,3-6,4-5 1-3,2-4,5-6 1-3,2-5,4-6 1-3,2-6,4-5 1-4,2-3,5-6 1-4,2-5,3-6 1-4,2-6,3-5 1-5,2-3,4-6 1-5,2-4,3-6 1-5,2-6,3-4 1-6,2-3,4-5 1-6,2-4,3-5 1-6,2-5,3-4 Can anyone help me in this Unlikely, unless you are a bit more specific about what you are trying to do. And even then, it's hard to help you to improve your code if you don't show it. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: hi
On Tue, Sep 13, 2011 at 10:00 AM, pradeep epradeep.kumar1...@gmail.com wrote: Can anyone help me in this Of course we can! #/usr/bin/perl use strict; use warnings; my $input = ; chomp $input; if($input eq '1,2,3,4,5,6') { print 'EOF'; 1-2,3-4,5-6 1-2,3-5,4-6 1-2,3-6,4-5 1-3,2-4,5-6 1-3,2-5,4-6 1-3,2-6,4-5 1-4,2-3,5-6 1-4,2-5,3-6 1-4,2-6,3-5 1-5,2-3,4-6 1-5,2-4,3-6 1-5,2-6,3-4 1-6,2-3,4-5 1-6,2-4,3-5 1-6,2-5,3-4 EOF } __END__ You're welcome. _ Regards, -- Brandon McCaig http://www.bamccaig.com/ bamcc...@gmail.com V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software http://www.castopulence.org/ bamcc...@castopulence.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: hi
On Wed, Sep 14, 2011 at 12:35 PM, Brandon McCaig bamcc...@gmail.com wrote: #/usr/bin/perl Silly me, I forgot the bang. --- a Wed Sep 14 12:38:40 2011 +++ b Wed Sep 14 12:38:46 2011 @@ -1,4 +1,4 @@ -#/usr/bin/perl +#!/usr/bin/perl use strict; use warnings; -- Brandon McCaig http://www.bamccaig.com/ bamcc...@gmail.com V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software http://www.castopulence.org/ bamcc...@castopulence.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Hi all!
Hi all guys, I'm new to PERL, I'm now to the list. This is just for a presentation... See you soon. chew23 -- go ahead... be a heretic! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi all!
On Tuesday 30 Mar 2010 13:38:12 chew23 wrote: Hi all guys, I'm new to PERL, I'm now to the list. This is just for a presentation... Hi chew23! Welcome to the Perl world , Perl community and this list. You can find many resources and links to resources for Perl beginners on the Perl Beginners' Site: http://perl-begin.org/ I hope you're going to like Perl 5 and will use it for years to come. [P6] Just a note - it's either Perl or perl but never PERL: http://perl.org.il/misc.html#pl_vs_pl Regards, Shlomi Fish [P6] - Perl 6 is entirely different, and as good as it may eventually be, still does not have a production-ready implementation, nor does it intend to completely eliminate Perl 5. See you soon. chew23 -- - Shlomi Fish http://www.shlomifish.org/ Why I Love Perl - http://shlom.in/joy-of-perl Deletionists delete Wikipedia articles that they consider lame. Chuck Norris deletes deletionists whom he considers lame. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi all!
Welcome to the Perl world , Perl community and this list. You can find many resources and links to resources for Perl beginners on the Perl Beginners' Site: http://perl-begin.org/ Many thanks for this! I hope you're going to like Perl 5 and will use it for years to come. [P6] Just a note - it's either Perl or perl but never PERL: http://perl.org.il/misc.html#pl_vs_pl I apologize to the list, but I was not aware of this. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi all!
On Tue, 30 Mar 2010 18:20:02 +0200 chew23 johnvoo...@hotmail.it wrote: I hope you're going to like Perl 5 and will use it for years to come. [P6] Just a note - it's either Perl or perl but never PERL: http://perl.org.il/misc.html#pl_vs_pl I apologize to the list, but I was not aware of this. Few non-Perl mongers are. (It's just that some mongers get really antsy if you get it wrong.) FYI: Perl is used for the language and anything related to it. perl is the name of the program that runs Perl scripts. If in doubt, use Perl. Also, Perl mongers are advocates for Perl. See http://www.pm.org/ to find mongers near you. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. Eliminate software piracy: use only FLOSS. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Hi all!
On Tuesday 30 Mar 2010 20:02:54 Shawn H Corey wrote: On Tue, 30 Mar 2010 18:20:02 +0200 chew23 johnvoo...@hotmail.it wrote: I hope you're going to like Perl 5 and will use it for years to come. [P6] Just a note - it's either Perl or perl but never PERL: http://perl.org.il/misc.html#pl_vs_pl I apologize to the list, but I was not aware of this. Few non-Perl mongers are. (It's just that some mongers get really antsy if you get it wrong.) Well, you can blame the ghosts of the ancient Greek for thinking that introducing two parallel sets of letters - the uppercase and the lowercase ones was a good idea. Some alphabets such as the Hebrew Alphabet or the Arabic Alphabet only have one set of letters, and they work fine. That put aside, I still try to write in proper-case English and prefer to read properly- capitalised English text, because I find it easier. FYI: Perl is used for the language and anything related to it. perl is the name of the program that runs Perl scripts. If in doubt, use Perl. My link explained that. Also, Perl mongers are advocates for Perl. See http://www.pm.org/ to find mongers near you. Another thing - the word monger. Compare: 1. Fish monger. 2. Perl monger. 3. Hate monger. In Hebrew 1 would be Mokher, 2 would be Shocher and 3 would be Mecharcher. If we called ourselves Mokhrey HaPerl or Mecharcherey HaPerl people will get the wrong idea. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ Deletionists delete Wikipedia articles that they consider lame. Chuck Norris deletes deletionists whom he considers lame. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
+Hi+
--- _ Hotmail: Trusted email with powerful SPAM protection. http://clk.atdmt.com/GBL/go/210850553/direct/01/
HI
Hello, Can anyone help me to explain how to call subroutines. Also if possible, explain with example for running blast searches. Many Thanks.
Fwd: HI
Thanks for reply Rajiv. Will go through.Also can you explain me what this error means: Odd number of elements in anonymous hash at /usr/lib/cgi-bin/websubroutine.pl line 18. line 18 is as follows: print $q-header(text/html),
Re: HI
2009/9/30 Jyoti jcutiep...@gmail.com: Thanks for reply Rajiv. Will go through.Also can you explain me what this error means: Odd number of elements in anonymous hash at /usr/lib/cgi-bin/websubroutine.pl line 18. That may mean, you passed wrong arguments to the method in a class. The method expects a hash, should have even number of elements. line 18 is as follows: print $q-header(text/html), Maybe you got wrong in other location. This statement has no problem for me: # perl -MCGI -e '$q=CGI-new;print $q-header(text/html)' Content-Type: text/html; charset=ISO-8859-1 Jeff. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: HI
Thanks Jeff On Wed, Sep 30, 2009 at 4:40 AM, Jeff Peng jeff.p...@freenet.de wrote: 2009/9/30 Jyoti jcutiep...@gmail.com: Thanks for reply Rajiv. Will go through.Also can you explain me what this error means: Odd number of elements in anonymous hash at /usr/lib/cgi-bin/websubroutine.pl line 18. That may mean, you passed wrong arguments to the method in a class. The method expects a hash, should have even number of elements. line 18 is as follows: print $q-header(text/html), Maybe you got wrong in other location. This statement has no problem for me: # perl -MCGI -e '$q=CGI-new;print $q-header(text/html)' Content-Type: text/html; charset=ISO-8859-1 Jeff.
Hi
I have a general perl question. I'm on OSX running a program from the command line. That program asks a series of questions, which I interactively answer. I would like to use perl to run the program (this part is not the problem) and answer the questions (this is the part I need help with). I have seen this type of thing done with a shell script (I think you can use the ECHO command in the bourne shell) but how would I do this in perl? Thanks, John
Re: Hi
Hi, You may want Expect: http://search.cpan.org/~rgiersig/Expect-1.21/Expect.pod On Fri, Jul 10, 2009 at 3:00 PM, John Somozajohn.som...@gmail.com wrote: I have a general perl question. I'm on OSX running a program from the command line. That program asks a series of questions, which I interactively answer. I would like to use perl to run the program (this part is not the problem) and answer the questions (this is the part I need help with). I have seen this type of thing done with a shell script (I think you can use the ECHO command in the bourne shell) but how would I do this in perl? Thanks, John -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Hi all
Hi ... I have to make my back button of the browser disable ... can any one help me in doing that using perl script... Thanks in advance Anusha Krishnachand
RE: Hi all
From: Anusha Krishna chand I have to make my back button of the browser disable ... can any one help me in doing that using perl script... Thanks in advance Anusha Krishnachand The quickest way to do that in most browsers is right click on the toolbar, select customize and remove the button from the bar. If you mean disable it on browsers used to view your pages, you can't do that and shouldn't even try. That button is a basic feature of the browser and should always be available. I do know there is a javascript trick that works on some browsers, but I consider that a bug that should have been fixed long ago. I also file bug reports on any site that I notice interfering with the use of back and forward buttons. Another option is to add 'target=_blank' attribute to the anchor to open the page in a new tab or window. Bob McConnell -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi... Help regarding chdir
On Dec 19, 2007 2:05 PM, Tom Phoenix [EMAIL PROTECTED] wrote: On 12/19/07, Chas. Owens [EMAIL PROTECTED] wrote: On Dec 19, 2007 2:29 AM, Ravindra Ugaji [EMAIL PROTECTED] wrote: chdir ( '/opt/application') || die (Can't change directory: $!\n); tried this also chdir /opt/application || die Can't change directory: $!\n; In addition to what others have already said, never do the second*. The || operator has a higher precedence than function calls, so func string || die oops; is really saying func(string || die(oops)); Since string is truthy, the die will never occur. You have the right idea about functions in general; but chdir() is a named unary operator, so it has higher precedence than the || operator: chdir /any/wrong/path || die This will indeed die: $!; That means that the OP's code isn't so wrong as it may seem, even though there's surely a better way to write it. snip That is the reason I used func instead of chdir. The don't use || in that way, use or instead is more of a general warning not to use the construct (because it will bite you). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Hi... Help regarding chdir
Hi Monks, I am trying the following code to change the directory chdir ( '/opt/application') || die (Can't change directory: $!\n); tried this also chdir /opt/application || die Can't change directory: $!\n; But i am unable to change the directory to /opt/application from present working directory I am using perl 5.6.1 built for sun4-solaris-64int and it wont support File::chdir can any one suggest the alternative solution for this problem? :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi... Help regarding chdir
It should work unless the user you are using to run the script doesn't have the rights to chdir to that directory. Ravindra Ugaji wrote: Hi Monks, I am trying the following code to change the directory chdir ( '/opt/application') || die (Can't change directory: $!\n); tried this also chdir /opt/application || die Can't change directory: $!\n; But i am unable to change the directory to /opt/application from present working directory I am using perl 5.6.1 built for sun4-solaris-64int and it wont support File::chdir can any one suggest the alternative solution for this problem? :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi... Help regarding chdir
On 12/18/07, Ravindra Ugaji [EMAIL PROTECTED] wrote: Hi Monks, The Perl Monks are two doors down, on the left. But maybe we can help you here. I am trying the following code to change the directory chdir ( '/opt/application') || die (Can't change directory: $!\n); But i am unable to change the directory to /opt/application from present working directory Do you get an error message? What does it say? If there is no error message, perhaps you mean that, after the program has finished running, you find that the shell is still using the original working directory. That's a feature of your operating system, not a bug. You can't change the working directory of another program without that program's knowledge and consent, else programs would unexpectedly find themselves working in the wrong directories and wreaking havoc. This is covered in the Unix FAQ, question 2.8, among other places; but the answer is about the same in principle on any other OS. http://www.faqs.org/faqs/unix-faq/faq/part2/ http://packetstormsecurity.org/unix-humor/awesome.unix.chdir.program.html Check the documentation for your shell program, too, because it may have a suggestion on how you can do what you want. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi... Help regarding chdir
On Dec 19, 2007 2:29 AM, Ravindra Ugaji [EMAIL PROTECTED] wrote: Hi Monks, I am trying the following code to change the directory chdir ( '/opt/application') || die (Can't change directory: $!\n); tried this also chdir /opt/application || die Can't change directory: $!\n; snip In addition to what others have already said, never do the second*. The || operator has a higher precedence than function calls, so func string || die oops; is really saying func(string || die(oops)); Since string is truthy, the die will never occur. If you want to avoid the use of parenthesis you can use the lower precedence or: func string or die oops; * unless, of course, it is what you really mean -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi... Help regarding chdir
On 12/19/07, Chas. Owens [EMAIL PROTECTED] wrote: On Dec 19, 2007 2:29 AM, Ravindra Ugaji [EMAIL PROTECTED] wrote: chdir ( '/opt/application') || die (Can't change directory: $!\n); tried this also chdir /opt/application || die Can't change directory: $!\n; In addition to what others have already said, never do the second*. The || operator has a higher precedence than function calls, so func string || die oops; is really saying func(string || die(oops)); Since string is truthy, the die will never occur. You have the right idea about functions in general; but chdir() is a named unary operator, so it has higher precedence than the || operator: chdir /any/wrong/path || die This will indeed die: $!; That means that the OP's code isn't so wrong as it may seem, even though there's surely a better way to write it. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi... Help regarding chdir
On Dec 19, 2:29 am, [EMAIL PROTECTED] (Ravindra Ugaji) wrote: I am trying the following code to change the directory chdir ( '/opt/application') || die (Can't change directory: $!\n); tried this also chdir /opt/application || die Can't change directory: $!\n; But i am unable to change the directory to /opt/application from present working directory What is your indication of that? How do you know the directory has not changed? Do you get an error message, and if so, what is it? Do you have some code below this later that proves you're not in /opt/ application? Or do you mean that when your program exits, you are back where you started the program from? That is, you are in /home/jsmith, you run this program, and when the program exits, you're still in /home/ jsmith. If that's the error you're talking about, please read: perldoc -q directory Found in /usr/lib/perl5/5.8/pods/perlfaq8.pod I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible? Paul Lalli -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Hi ....
Hi All: Just sending a test email to see if this works. I started reading the archives saw that this is a very friendly community. I'm a PERL beginner I've already learned some things reading the archives. Glad I found you guys! Thanks. -- == | Chris E. Rempola ||Email: [EMAIL PROTECTED] fax#408.545.0549 | | #408.545.0500 x719 ||Bay Area Internet Solutions | | Technical Support ||Please visit us @ http://bayarea.net | == -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi ....
Welcome. But,would you maybe never send a test message to this list? It would trouble most of the people on this list. :) -Original Message- From: Chris E. Rempola [EMAIL PROTECTED] Sent: Mar 9, 2007 11:33 AM To: beginners@perl.org Subject: Hi Hi All: Just sending a test email to see if this works. I started reading the archives saw that this is a very friendly community. I'm a PERL beginner I've already learned some things reading the archives. Glad I found you guys! Thanks. -- http://home.arcor.de/jeffpang/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi ....
Chris E. Rempola wrote: Hi All: Hello, Just sending a test email to see if this works. I started reading the archives saw that this is a very friendly community. I'm a PERL http://perldoc.perl.org/perlfaq1.html#What's-the-difference-between-%22perl%22-and-%22Perl%22%3f :-) John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi ....
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (from the link) But never write PERL, because perl is not an acronym, apocryphal folklore and post-facto expansions notwithstanding. I always thought it was an acronym, for Pratical Extraction and Report Language. Is that untrue, just one of those post-facto expansions? On Mar 9, 2007, at 11:31 AM, John W. Krahn wrote: Chris E. Rempola wrote: Hi All: Hello, Just sending a test email to see if this works. I started reading the archives saw that this is a very friendly community. I'm a PERL http://perldoc.perl.org/perlfaq1.html#What's-the-difference-between- %22perl%22-and-%22Perl%22%3f :-) John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (Darwin) iD8DBQFF8cBvuT/QpFTX5YIRAm9pAKDFXOb/66EJQVCea/Fh7NhFELbFjACgq/IG ancDeR0+a7rXobtE3AApPz4= =Anpl -END PGP SIGNATURE- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: Hi ....
Neal Clark wrote: I always thought it was an acronym, for Pratical Extraction and Report Language. Is that untrue, just one of those post-facto expansions? Indeed, just as Pathologically Eclectic Rubbish Lister. -- David Moreno Garza [EMAIL PROTECTED] | http://www.damog.net/ Si tienes quién te quiera, entonces eres millonario. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Hi,, Regarding perl modules
Hi I am vikas here, just getting in perl.. can anybody told me to create modules and how to use these in our scripts.. Thanks Vikas Kumar Choudhary Software Engineer Bangalore-50078 Mobile:- 91-9886793145
Re: Hi,, Regarding perl modules
On 10 Jan 2007 09:21:55 -, Vikas Kumar Choudhary [EMAIL PROTECTED] wrote: Hi I am vikas here, just getting in perl.. can anybody told me to create modules and how to use these in our scripts.. $ perldoc perlmod should get you started. To use modules you've created, just put this at the top of your program. use yourMod; Thanks Vikas Kumar Choudhary Software Engineer Bangalore-50078 Mobile:- 91-9886793145 -- I'm nerdy in the extreme and whiter than sour cream -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Hi all, can we read or delete multi-lines from Listbox widget?
Hi all, Can we read or delete multi-lines from Listbox widget? If not, what widget can do it? Text? If it can, how to do it? Please help me. I waste a lot of time and can't figure it out. Thanks. Hui Wang. - 雅虎免费邮箱-3.5G容量,20M附件
Re: Hi, how to extract five texts on each side of an URI? I post my own perl script and its use.
From: ťÔ Íő [EMAIL PROTECTED] my $text; for my $left_index (1..WIDTH) { last if $start_index $left_index; $text .= $texts_arr[$start_index - $left_index] . ' '; } $text .= join( , @texts_arr[$start_index..$end_index]) . ' '; for my $right_index (1..WIDTH) { last if $end_index + $right_index $#texts_arr; $text .= $texts_arr[$end_index + $right_index] . ' '; } $text_hash{$url} = $text; As far as I can tell this could easily be rewriten with no loops. If I understand it correctly you want to get all the texts from $start_index-WIDTH to $end_index+WIDTH so something like: my $left_index = $start_index - WIDTH; $left_index = 0 if $left_index 0; my $right_index = $end_index + WIDTH; $right_index = $#texts_arr if $right_index $#texts_arr; my $text = join( , @texts_arr[$left_index .. $right_index]); should do what you are after. There are probable other things, but this caught my eyes. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Hi all, when click on an item which laied in a ListBox, can we let some strings print into a Text widget area.
Hi all, Hi all, when click on an item which laied in a ListBox, can we let some strings print into a Text widget area. Below is my perl script which does not work properly. use warnings; use strict; use Tk; use URI; my $mw = MainWindow-new; my $text = $mw-Scrolled(qw/Text -relief sunken -borderwidth 2 -setgrid 1 -height 10 -width 20 -scrollbars se/); $text-pack(qw/-expand yes -fill both/); my $list = $mw-Scrolled(qw/Listbox -setgrid 1 -height 10 -width 20 -scrollbars se/); $list-pack(qw/-side bottom -expand yes -fill both/); $list-focus; $list-bind('Double-1' = sub { print want to print an url's content to '\$text'\n; }, ); my(@pl) = qw/-side top -pady 1 -anchor nw/; open IN, urls or die $!; while(IN){ chomp; next if $_ =~ /^\s*$/; my $url = URI-new($_); my $b1 = $list-Checkbutton( -text = $url, -relief = 'flat' )-pack(@pl); } close IN; MainLoop; Who can help me? thanks. Hui Wang - Mp3疯狂搜-新歌热歌高速下
Hi, how to extract five texts on each side of an URI? I post my own perl script and its use.
Hello everyone; Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL(except anchor text). I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve the running speed of this program? Thanks. Below is my own implemented perl module named 'chakrabarti.pm'. #!/usr/bin/perl package chakrabarti; require Exporter; @ISA = qw/Exporter/; @EXPORT = qw/extract_url_and_text/; use warnings; use strict; use HTML::TreeBuilder; use URI; use constant WIDTH = 5; my @texts_arr = (); my @anchor_index = (); sub extract_url_and_text{ my($html_ref, $base_ref) = @_; my %text_hash; my $tree = HTML::TreeBuilder-new_from_content(${$html_ref}); my $body_tag = $tree-find_by_tag_name('body'); process($body_tag); for (@anchor_index) { my ($start_index, $end_index, $url) = ($_-[0], $_-[1], $_-[2]); $url = URI-new_abs($url, ${$base_ref}); my $text; for my $left_index (1..WIDTH) { last if $start_index $left_index; $text .= $texts_arr[$start_index - $left_index] . ' '; } $text .= join( , @texts_arr[$start_index..$end_index]) . ' '; for my $right_index (1..WIDTH) { last if $end_index + $right_index $#texts_arr; $text .= $texts_arr[$end_index + $right_index] . ' '; } $text_hash{$url} = $text; } $tree-delete; return [\%text_hash]; } sub process { my $tag = shift; my ($start_index, $end_index, $url); if ($tag-tag eq 'a') { $start_index = @texts_arr; $url = $tag-attr('href'); } foreach my $kid ($tag-content_list) { if (ref $kid) { process($kid); } else { push @texts_arr, $kid; } } if ($tag-tag eq 'a') { $end_index = @texts_arr - 1; push @anchor_index, [$start_index, $end_index, $url]; } } 1; Then, in my perl program, I can invoke this module. Below is a working example: use warnings; use strict; use LWP::UserAgent; use chakrabarti; my $ua = LWP::UserAgent-new; my $res = $ua-get('http://www.cpan.org/'); if($res-is_success){ my $url_text_ref = extract_url_and_text($res-content_ref, $res-base); for(keys %{$url_text_ref-[0]}){ print $_, \n, ${$url_text_ref-[0]}{$_}, \n\n; } } Below is the Chakrabarti's article: http://www.cs.berkeley.edu/~soumen/doc/www2002m/p336-chakrabarti.pdf Good luck! Hui Wang - 抢注雅虎免费邮箱-3.5G容量,20M附件!
Re: Hi, how to extract five texts on each side of an URI? I post my own perl script and its use.
On Sunday 12 November 2006 13:17, 辉 王 wrote: I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve the running speed of this program? Thanks. Have you had a look with the Perl profiler to see which bits are going slow. That way you know to look at make them run faster. See perldoc Devel::DProf for more information. -- Robin [EMAIL PROTECTED] JabberID: [EMAIL PROTECTED] Hostes alienigeni me abduxerunt. Qui annus est? PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D pgpIhJEoay9Ke.pgp Description: PGP signature
RE: Hi, how to extract five texts on each side of an URI? I post my own perl script and its use.
Hui Wang mailto:[EMAIL PROTECTED] wrote: : Can anybody tell me how to improve the running speed of this : program? Thanks. I don't know if this is faster, but it is a more accurate solution. Your submitted code failed under some untested circumstances. I created another page similar to the CPAN page you used and fed it more complicated tests. Chakrabarti placed relevance on distance from the link. I changed your report to reflect this relevance. Instead of squashing all text together, it now shows a report of text token relevance. This change allowed me to test more thoroughly as well. Here is the sample report for one link with multiple texts inside the anchor. http://www.clarksonenergyhomes.com/scripts/index.html -5: 3401 MB 280 mirrors -4: 5501 authors 10789 modules -3: Welcome to CPAN! Here you will find All Things Perl. -2: Browsing -1: Perl modules 0: Perl 0: scripts +1: Perl binary distributions (ports) +2: Perl source code +3: Perl recent arrivals +4: recent +5: Perl modules You can find the modified code here (for a short time): Script: http://www.clarksonenergyhomes.com/chakrabarti.txt Module: http://www.clarksonenergyhomes.com/chakrabarti.pm HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer 254 968-8328 http://www.clarksonenergyhomes.com/ Don't tread on my bandwidth. Trim your posts. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Hi everyone, how to extract five texts on each side of an URI? I post my own perl script this time.
Hello, everyone, Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL(except anchor text). I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve the running speed of this program? Thanks. Below is my own implemented perl script, but it runs slowly. #!/usr/bin/perl package chakrabarti; require Exporter; @ISA = qw/Exporter/; @EXPORT = qw/extract_url_and_text/; use warnings; use strict; use HTML::TreeBuilder; use URI; use constant WIDTH = 5; my @texts_arr = (); my @anchor_index = (); sub extract_url_and_text{ my($html_ref, $base_ref) = @_; my %text_hash; my $tree = HTML::TreeBuilder-new_from_content(${$html_ref}); my $body_tag = $tree-find_by_tag_name('body'); process($body_tag); for (@anchor_index) { my ($start_index, $end_index, $url) = ($_-[0], $_-[1], $_-[2]); $url = URI-new_abs($url, ${$base_ref}); my $text; for my $left_index (1..WIDTH) { last if $start_index $left_index; $text .= $texts_arr[$start_index - $left_index] . ' '; } $text .= join( , @texts_arr[$start_index..$end_index]) . ' '; for my $right_index (1..WIDTH) { last if $end_index + $right_index $#texts_arr; $text .= $texts_arr[$end_index + $right_index] . ' '; } $text_hash{$url} = $text; } $tree-delete; return [\%text_hash]; } sub process { my $tag = shift; my ($start_index, $end_index, $url); if ($tag-tag eq 'a') { $start_index = @texts_arr; $url = $tag-attr('href'); } foreach my $kid ($tag-content_list) { if (ref $kid) { process($kid); } else { push @texts_arr, $kid; } } if ($tag-tag eq 'a') { $end_index = @texts_arr - 1; push @anchor_index, [$start_index, $end_index, $url]; } } 1; Below is the Chakrabarti's article: http://www.cs.berkeley.edu/~soumen/doc/www2002m/p336-chakrabarti.pdf Good luck! Hui Wang - 抢注雅虎免费邮箱-3.5G容量,20M附件!
RE: Hi everyone, how to extract five texts on each side of an URI? I post my own perl script this time.
Hui Wang mailto:[EMAIL PROTECTED] wrote: : I can make my program do its job at last, but it runs : slowly. Can anybody tell me how to improve the running : speed of this program? You only provided the module. Can you supply a working example? Something we can actually run? HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer 254 968-8328 http://www.clarksonenergyhomes.com/ Don't tread on my bandwidth. Trim your posts. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Hi, how to extract five texts on each side of an URI? I post my own perl script and its use.
Hello, everyone, Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL(except anchor text). I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve the running speed of this program? Thanks. Below is my own implemented perl module named 'chakrabarti.pm'. #!/usr/bin/perl package chakrabarti; require Exporter; @ISA = qw/Exporter/; @EXPORT = qw/extract_url_and_text/; use warnings; use strict; use HTML::TreeBuilder; use URI; use constant WIDTH = 5; my @texts_arr = (); my @anchor_index = (); sub extract_url_and_text{ my($html_ref, $base_ref) = @_; my %text_hash; my $tree = HTML::TreeBuilder-new_from_content(${$html_ref}); my $body_tag = $tree-find_by_tag_name('body'); process($body_tag); for (@anchor_index) { my ($start_index, $end_index, $url) = ($_-[0], $_-[1], $_-[2]); $url = URI-new_abs($url, ${$base_ref}); my $text; for my $left_index (1..WIDTH) { last if $start_index $left_index; $text .= $texts_arr[$start_index - $left_index] . ' '; } $text .= join( , @texts_arr[$start_index..$end_index]) . ' '; for my $right_index (1..WIDTH) { last if $end_index + $right_index $#texts_arr; $text .= $texts_arr[$end_index + $right_index] . ' '; } $text_hash{$url} = $text; } $tree-delete; return [\%text_hash]; } sub process { my $tag = shift; my ($start_index, $end_index, $url); if ($tag-tag eq 'a') { $start_index = @texts_arr; $url = $tag-attr('href'); } foreach my $kid ($tag-content_list) { if (ref $kid) { process($kid); } else { push @texts_arr, $kid; } } if ($tag-tag eq 'a') { $end_index = @texts_arr - 1; push @anchor_index, [$start_index, $end_index, $url]; } } 1; Then, in my perl program, I can invoke this module. Below is a working example: use warnings; use strict; use LWP::UserAgent; use chakrabarti; my $ua = LWP::UserAgent-new; my $res = $ua-get('http://www.cpan.org/'); if($res-is_success){ my $url_text_ref = extract_url_and_text($res-content_ref, $res-base); for(keys %{$url_text_ref-[0]}){ print $_, \n, ${$url_text_ref-[0]}{$_}, \n\n; } } Below is the Chakrabarti's article: http://www.cs.berkeley.edu/~soumen/doc/www2002m/p336-chakrabarti.pdf Good luck! Hui Wang - 抢注雅虎免费邮箱-3.5G容量,20M附件!
Hi everyone, who can tell me how to extract five texts on each side of an URI? Thanks
Hello, everyone, Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL. I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve the running speed of this program? Thanks. Below is the Chakrabarti's article: http://www.cs.berkeley.edu/~soumen/doc/www2002m/p336-chakrabarti.pdf Good luck! Hui Wang - Mp3疯狂搜-新歌热歌高速下
Re: Hi everyone, who can tell me how to extract five texts on each side of an URI? Thanks
Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL. No one can give helps unless he also know this special algorithm. -- Books below translated by me to Chinese. Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/ Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi everyone, who can tell me how to extract five texts on each side of an URI? Thanks
On Thursday 09 November 2006 01:33, 辉 王 wrote: Hello, everyone, Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL. I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve the running speed of this program? Thanks. Below is the Chakrabarti's article: http://www.cs.berkeley.edu/~soumen/doc/www2002m/p336-chakrabarti.pdf If you give an example input url, the desired output of that url, and your slow but working code people might be able to help you. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47 Thormöhlensgate 47, 5006 Bergen, Norway - www.nersc.no Google Earth: www.nersc.no/GE - TOPAZ: topaz.nersc.no -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi, Everyone, I can't install perl modules correctly using CPAN, why?
On 11/3/06, Jeff Pang [EMAIL PROTECTED] wrote: Hi, everyone, When I want to install perl module WWW::Yahoo::KeywordExtractor in my Ubuntu damper 6.06 OS, it doesn't work properly. Looks like something with XML is wrong. Give a try to install XML::SAX::Expat and XML::Simple at first. Did you see this? Fatal error: Your default XML parser (XML::SAX::PurePerl) is broken. There are known bugs in the PurePerl parser included with version 0.13 and 0.14 of XML::SAX. The XML::Simple tests will fail with this parser. One way to avoid the problem is to install XML::SAX::Expat - it will install itself as the system default XML parser and then you will be able to install XML::Simple successfully. XML::SAX::Expat is also much faster than XML::SAX::PurePerl so you probably want it anyway. I'd install XML::SAX::Expat, then try again. Good luck! - Jen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Hi, Everyone, I can't install perl modules correctly using CPAN, why?
Hi, everyone, When I want to install perl module WWW::Yahoo::KeywordExtractor in my Ubuntu damper 6.06 OS, it doesn't work properly. The error message is listed below: === CPAN: Storable loaded ok Going to read /home/wanghui/.cpan/Metadata Database was generated on Mon, 30 Oct 2006 21:24:24 GMT CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://mirrors.hknet.com/CPAN/authors/01mailrc.txt.gz LWP failed with code[500] message[read timeout] CPAN: Net::FTP loaded ok Fetching with Net::FTP: ftp://mirrors.hknet.com/CPAN/authors/01mailrc.txt.gz Could not connect to host 'mirrors.hknet.com' with Net::FTP Fetching with LWP: http://cpan.linuxforum.net/authors/01mailrc.txt.gz Going to read /home/wanghui/.cpan/sources/authors/01mailrc.txt.gz Fetching with LWP: ftp://mirrors.hknet.com/CPAN/modules/02packages.details.txt.gz Going to read /home/wanghui/.cpan/sources/modules/02packages.details.txt.gz Database was generated on Wed, 01 Nov 2006 15:24:03 GMT Fetching with LWP: ftp://mirrors.hknet.com/CPAN/modules/03modlist.data.gz Going to read /home/wanghui/.cpan/sources/modules/03modlist.data.gz Going to write /home/wanghui/.cpan/Metadata Running install for module WWW::Yahoo::KeywordExtractor Running make for S/SO/SOCK/WWW-Yahoo-KeywordExtractor-0.04.tar.gz cpan install WWW::Yahoo::KeywordExtractorCPAN: Digest::SHA loaded ok Checksum for /home/wanghui/.cpan/sources/authors/id/S/SO/SOCK/WWW-Yahoo-KeywordExtractor-0.04.tar.gz ok Scanning cache /home/wanghui/.cpan/build for sizes WWW-Yahoo-KeywordExtractor-0.04/ WWW-Yahoo-KeywordExtractor-0.04/Build.PL WWW-Yahoo-KeywordExtractor-0.04/Changes WWW-Yahoo-KeywordExtractor-0.04/lib/ WWW-Yahoo-KeywordExtractor-0.04/lib/WWW/ WWW-Yahoo-KeywordExtractor-0.04/lib/WWW/Yahoo/ WWW-Yahoo-KeywordExtractor-0.04/lib/WWW/Yahoo/KeywordExtractor.pm WWW-Yahoo-KeywordExtractor-0.04/MANIFEST WWW-Yahoo-KeywordExtractor-0.04/META.yml WWW-Yahoo-KeywordExtractor-0.04/README WWW-Yahoo-KeywordExtractor-0.04/t/ WWW-Yahoo-KeywordExtractor-0.04/t/02-pod.t WWW-Yahoo-KeywordExtractor-0.04/t/03-pod_coverage.t WWW-Yahoo-KeywordExtractor-0.04/t/04-perl_critic.t WWW-Yahoo-KeywordExtractor-0.04/t/11-compile.t Removing previously used /home/wanghui/.cpan/build/WWW-Yahoo-KeywordExtractor-0.04 CPAN.pm: Going to build S/SO/SOCK/WWW-Yahoo-KeywordExtractor-0.04.tar.gz Checking whether your kit is complete... Looks good Checking prerequisites... - ERROR: XML::Simple is not installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Creating new 'Build' script for 'WWW-Yahoo-KeywordExtractor' version '0.04' CPAN: YAML loaded ok CPAN: Module::Build loaded ok Warning: CPAN.pm discovered Module::Build as undeclared prerequisite. Adding it now as such. Unsatisfied dependencies detected during [S/SO/SOCK/WWW-Yahoo-KeywordExtractor-0.04.tar.gz] - XML::Simple Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] Running Build test Delayed until after prerequisites Running Build install Delayed until after prerequisites Running install for module XML::Simple Running make for G/GR/GRANTM/XML-Simple-2.16.tar.gz Checksum for /home/wanghui/.cpan/sources/authors/id/G/GR/GRANTM/XML-Simple-2.16.tar.gz ok XML-Simple-2.16/ XML-Simple-2.16/t/ XML-Simple-2.16/t/1_XMLin.xml XML-Simple-2.16/t/lib/ XML-Simple-2.16/t/lib/TagsToUpper.pm XML-Simple-2.16/t/B_Hooks.t XML-Simple-2.16/t/6_ObjIntf.t XML-Simple-2.16/t/1_XMLin.t XML-Simple-2.16/t/srt.xml XML-Simple-2.16/t/4_MemShare.t XML-Simple-2.16/t/3_Storable.t XML-Simple-2.16/t/7_SaxStuff.t XML-Simple-2.16/t/A_XMLParser.t XML-Simple-2.16/t/0_Config.t XML-Simple-2.16/t/subdir/ XML-Simple-2.16/t/subdir/test2.xml XML-Simple-2.16/t/2_XMLout.t XML-Simple-2.16/t/5_MemCopy.t XML-Simple-2.16/t/8_Namespaces.t XML-Simple-2.16/t/test1.xml XML-Simple-2.16/t/desertnet.src XML-Simple-2.16/t/9_Strict.t XML-Simple-2.16/Changes XML-Simple-2.16/MANIFEST XML-Simple-2.16/lib/ XML-Simple-2.16/lib/XML/ XML-Simple-2.16/lib/XML/Simple/ XML-Simple-2.16/lib/XML/Simple/FAQ.pod XML-Simple-2.16/lib/XML/Simple.pm XML-Simple-2.16/META.yml XML-Simple-2.16/maketest XML-Simple-2.16/README XML-Simple-2.16/Makefile.PL Removing previously used /home/wanghui/.cpan/build/XML-Simple-2.16 CPAN.pm: Going to build G/GR/GRANTM/XML-Simple-2.16.tar.gz Checking installed modules ... = Fatal error: Your default XML parser (XML::SAX::PurePerl) is broken. There are known bugs in the PurePerl parser included with version 0.13 and 0.14 of XML::SAX. The XML::Simple tests will fail with this parser. One way to avoid the problem is to install XML::SAX::Expat - it will install itself as the system default XML parser and then you will be able to install XML::Simple successfully. XML::SAX::Expat is also much faster than XML
Re: Hi, Everyone, I can't install perl modules correctly using CPAN, why?
Hi, everyone, When I want to install perl module WWW::Yahoo::KeywordExtractor in my Ubuntu damper 6.06 OS, it doesn't work properly. Looks like something with XML is wrong. Give a try to install XML::SAX::Expat and XML::Simple at first. -- Books below translated by me to Chinese. Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/ Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi
--- Kaushal Shriyan [EMAIL PROTECTED] wrote: Hi All I am a novice to perl,I would like to learn perl in a systematic way, Whats the best way to start with,I dont have any experience of programming Language, But I came to know that perl is a Good Programming Language Try Learning Perl, Fourth Edition (Paperback) by Randal L. Schwartz, Tom Phoenix, brian d foy. Here's one of many links: http://www.amazon.com/gp/product/0596101058/sr=8-2/qid=1147704150/ref=pd_bbs_2/103-0184362-2216600?%5Fencoding=UTF8 Ron Smith Thanks Kaushal -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi
I am a novice to perl,I would like to learn perl in a systematic way, Whats the best way to start with,I dont have any experience of programming Language, But I came to know that perl is a Good Programming Language Whether or not you do choose to use a book or not, remember: always try doing some excersizes. You *cannot* just read, you have to try it firsthand. This is as simple as writing your first program that just prints out ``Hello World'' to testing out the ugliest regular expressions (you will eventually learn what these are). Remember, you are just learning, and so you are free to experiment. Good Luck! -- Leonid Grinberg [EMAIL PROTECTED] http://www.lgrinberg.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Hi
Hi All I am a novice to perl,I would like to learn perl in a systematic way, Whats the best way to start with,I dont have any experience of programming Language, But I came to know that perl is a Good Programming Language Thanks Kaushal -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
hi,how to get the correct statistic
hi all, i copy source from http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=481lngWId=6, the piece source aims to merges 2 or more text files into one more manageable file. and it also remove the duplicates and comments (start with #). i run it on the windows 2003 server dos console: --- C:\Inetpub\wwwroot\cgi-bin\testperl WorldListMerger.pl Moth Merger 1.0 Wordlist Merger Please specify an output file:test7 Please specify an input file:a.txt 5 added to test7 1 duplicates in a.txtAdd another file?(y/n):y Please specify an input file:b.txt 7 added to test7 2 duplicates in b.txtAdd another file?(y/n):y Please specify an input file:c.txt 1 added to test7 0 duplicates in c.txtAdd another file?(y/n):n --- in a.txt: a b c #comments by joodhawk. d a c in b.txt e e f g h i j g f in c.txt zzz it is the incorrect result. as we excepted, such as in the a.txt, we know 2 duplicates apparently. how to correct it ? thanks in advance.
RE: hi,how to get the correct statistic
Joodhawk Lin wrote: : hi all, : : i copy source from : http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=48 1lngWId=6, : the piece source aims to merges 2 or more text files into one more : manageable file. and it also remove the duplicates and comments : (start with #). [snip] : : it is the incorrect result. as we excepted, such as in the : a.txt, we know 2 duplicates apparently. Not necessarily. One of the duplicate words in a.txt is the last line of the file. Does that line end with a new line character? Many text files do not. If it doesn't, this script will chop() the 'c' of the end of the word which will not match the previous line with a 'c' because on that line the line ending was chopped off. ('c' != '') Also, we cannot tell from your example that there is no stray white space in the files. The dated code you are using does not check for line endings (it uses chop()) and it does not strip for white space characters. The very fact that you didn't mention white space characters in your message leads me to believe they may be there. : how to correct it ? Rewrite it. The script was probably written as a utility for a very short term solution and was unlikely meant to be publicly used or traded. The author does not verify I/O operations, uses chop() where chomp() is more appropriate, has no error checking, is not using lexical variables, and seems a little unorganized. My advice would be to check your data files first to be certain your perceived errors are real errors and to stay away from this script if you are planning to put this into a production environment. Write your own script which follows more modern perl standards and checks for stray white space characters and missing last line line endings. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: hi please clarify my doubts
On 2/13/06, DEVARAJA AP [EMAIL PROTECTED] wrote: i wrote a perlscript to generate a verilog code with instantiations .in this after instantiation, the ports getting as eg module_name name(.a(a),.b(b),...) but for connection sakeif want to connect a to some k and b to some p (say).here we wanted to change those names manually. is ther any way to do trhis automatically in the instantiation part of the perl script itself. Almost certainly, what you want is possible. Perl is very versatile. Unfortunately, I cannot understand what you are asking about. It may help if you include the Perl code that you're talking about. If another language is better for you than English, feel free to try that one. At a guess, maybe you want something like this code. Or maybe not... if ($alternate_site) { $port = 'k'; } else { $port = 'a'; } Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: hi please clarify my doubts
Devaraja, Is this a question about vperl? You speak of generating verilog code. Is the instantiation you speak of the instantiation of your block that is defined in verilog? What do you mean by the instantiation part of the perl script? --Marilyn Tom Phoenix wrote On 02/14/06 09:49,: On 2/13/06, DEVARAJA AP [EMAIL PROTECTED] wrote: i wrote a perlscript to generate a verilog code with instantiations .in this after instantiation, the ports getting as eg module_name name(.a(a),.b(b),...) but for connection sakeif want to connect a to some k and b to some p (say).here we wanted to change those names manually. is ther any way to do trhis automatically in the instantiation part of the perl script itself. Almost certainly, what you want is possible. Perl is very versatile. Unfortunately, I cannot understand what you are asking about. It may help if you include the Perl code that you're talking about. If another language is better for you than English, feel free to try that one. At a guess, maybe you want something like this code. Or maybe not... if ($alternate_site) { $port = 'k'; } else { $port = 'a'; } Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response -- Marilyn E. Sander[EMAIL PROTECTED] Database (CM) Engineer Phone (408)616-5651 internal 45651 ~ NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ~ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
hi please clarify my doubts
HI i wrote a perlscript to generate a verilog code with instantiations .in this after instantiation, the ports getting as eg module_name name(.a(a),.b(b),...) but for connection sakeif want to connect a to some k and b to some p (say).here we wanted to change those names manually. is ther any way to do trhis automatically in the instantiation part of the perl script itself.please help me. Advance Thanks devaraja - What are the most popular cars? Find out at Yahoo! Autos
Hi, strange problem on calculation
Hi, I don't know why the result of my calculation doesn't make sense! foreach('0.43','-0.12','-0.08','-0.17','-0.06') { $value = $value + ($_); } print $value . br; Value = -2.77555756156289e-17 Should be 0.00 My Perl Version is: perl -V Summary of my perl5 (revision 5 version 8 subversion 4) Mit freundlichen Grüssen Ihr echtwahr.Webmaster http://www.echtwahr.de http://www.echtwahr.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi, strange problem on calculation
On Wed, 7 Dec 2005 [EMAIL PROTECTED] wrote: Hi, I don't know why the result of my calculation doesn't make sense! foreach('0.43','-0.12','-0.08','-0.17','-0.06') { $value = $value + ($_); } print $value . br; Value = -2.77555756156289e-17 Should be 0.00 What is the difference between -2.77555756156289e-17 and 0.00? It's all to do with the way numbers are represented in computers. Do a perldoc -f sprintf and have a read. Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi All
Randal L. Schwartz wrote: Hridyesh == Hridyesh Pant [EMAIL PROTECTED] writes: Hridyesh Check this site http://perldoc.perl.org/ Why refer someone to a website that replicates everything that is on their own disk anyway? It boggles my mind every time I see this! Because searching perldoc really, really sucks. The only search available is `perldoc -q keyword` and it only searches the FAQs and then, only their questions. That's right, only the questions; the answers are skipped! If you want to make perldoc useful, why don't you organize a project to go thru its PODs and add X... where appropriate? -- Just my 0.0002 million dollars worth, --- Shawn Probability is now one. Any problems that are left are your own. SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi All
On Wed, 16 Nov 2005, Shawn Corey wrote: Date: Wed, 16 Nov 2005 08:34:16 -0500 From: Shawn Corey [EMAIL PROTECTED] To: beginners@perl.org Subject: Re: Hi All Randal L. Schwartz wrote: Hridyesh == Hridyesh Pant [EMAIL PROTECTED] writes: Hridyesh Check this site http://perldoc.perl.org/ Why refer someone to a website that replicates everything that is on their own disk anyway? It boggles my mind every time I see this! Because searching perldoc really, really sucks. The only search available is `perldoc -q keyword` and it only searches the FAQs and then, only their questions. That's right, only the questions; the answers are skipped! If you want to make perldoc useful, why don't you organize a project to go thru its PODs and add X... where appropriate? I agree. Perldoc is of little use to the beginning student of perl. It needs a function similar to man -k then it would be really useful. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: Hi All
But why no one has done something to make Perldoc more helpful for all? Armando Gomez Guajardo Process Engineer Work Ph 956 547 6438 Beeper956 768 4070 -Original Message- From: Dennis G. Wicks [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 8:05 AM To: beginners@perl.org Subject: Re: Hi All On Wed, 16 Nov 2005, Shawn Corey wrote: Date: Wed, 16 Nov 2005 08:34:16 -0500 From: Shawn Corey [EMAIL PROTECTED] To: beginners@perl.org Subject: Re: Hi All Randal L. Schwartz wrote: Hridyesh == Hridyesh Pant [EMAIL PROTECTED] writes: Hridyesh Check this site http://perldoc.perl.org/ Why refer someone to a website that replicates everything that is on their own disk anyway? It boggles my mind every time I see this! Because searching perldoc really, really sucks. The only search available is `perldoc -q keyword` and it only searches the FAQs and then, only their questions. That's right, only the questions; the answers are skipped! If you want to make perldoc useful, why don't you organize a project to go thru its PODs and add X... where appropriate? I agree. Perldoc is of little use to the beginning student of perl. It needs a function similar to man -k then it would be really useful. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi All
Shawn Corey wrote: ...searching perldoc really, really sucks. The only search available is `perldoc -q keyword` and it only searches the FAQs and then, only their questions. That's right, only the questions; the answers are skipped! Here's a 3-line shell script I use to grep through the core documentation. #!/bin/sh poddir=$(dirname $(perldoc -l perl)) grep -r $@ $poddir/*.pod Example (on FreeBSD 5.4): $ podgrep -iwl gethostbyname /usr/local/lib/perl5/5.8.7/pod/perlfaq9.pod /usr/local/lib/perl5/5.8.7/pod/perlfunc.pod /usr/local/lib/perl5/5.8.7/pod/perlipc.pod /usr/local/lib/perl5/5.8.7/pod/perlos390.pod /usr/local/lib/perl5/5.8.7/pod/perlport.pod /usr/local/lib/perl5/5.8.7/pod/perltoc.pod /usr/local/lib/perl5/5.8.7/pod/perltoot.pod /usr/local/lib/perl5/5.8.7/pod/perlvms.pod But I agree that a Google search like gethostbyname site:perldoc.perl.org is superior. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Hi All
On Wed, Nov 16, 2005 at 08:28:39AM -0600, Gomez, Juan wrote: But why no one has done something to make Perldoc more helpful for all? Who are you expecting to do that? Perl is developed by volunteers. And the number of active developers is vanishingly small compared to the number of people who use Perl every day. Volunteers generally work on what they find interesting or stimulating or challenging. This is not always the case of course, people have their own motives. Maybe you are sufficiently motivated to work on improving perldoc? It would appear that most people aren't. Since Perl is open source, you have the usual options if you want something done: 1. Do it yourself. 2. Get someone else to do it. 3. Wait. Often the best way to get someone else to do something for you is to pay them. Yes, this is all a little simplistic, but the principles hold. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Hi All
Hi All, This is my first mail to this mailing list. I am just starting to learn Perl. Please help me in getting the basics cleared. Thanks Santosh
Re: Hi All
On Tue, 15 Nov 2005, Santosh Reddy wrote: This is my first mail to this mailing list. I am just starting to learn Perl. Please help me in getting the basics cleared. Here's some basics: http://learn.perl.org/ Here's another: This list responds best to direct questions about specific problems. If you want open-ended help with something that you haven't yet taken any time to research for yourself, stop right there, fire up your web browser (or get out your O'Reilly books), and spend some time studying up on the copious material that is already available for people that are just learning, as you are. Once you get your feet wet, and are working on specific tasks that you need help with, feel free to send specific questions -- along the lines of why doesn't this code work? or why doesn't this line do what I think it should or how can I complete the following subroutine? -- and we will be happy to help you out. But i you just want to open-endedly get the basics cleared, then this list is utterly the wrong place to ask. Start with a web search. Start with an excellent site like learn.perl.org. Start with some independent reading and practicing. And then come back to us once you're ready for the next step. -- Chris Devers ©957ðVÓ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: hi
Please respond to the list. I'm not always available to answer questions. Now for your questions, loosely numbered: 1,3) You probably either included use strict or perhaps included some other code that used strict. That enforces the requirement to lexically scope your variables, among other things. 2) Lexically scoping your variables does not affect your ability to use your variables at all. It just means that they automatically get created at the 'my' statement and destroyed at the end of the code block. If you do need a variable to exist throughout the entire script, you can declare it at the top of your script or use 'our' instead of 'my'. And finally, the question you didn't ask, but I'll answer anyway. I would seriously recommend adding 'use strict' and 'use warnings' in all of your scripts. It can be a real pain at first when you're not used to using it, but it can save you a lot of time in the long run. Keep an eye on the list and you can get a lot of good examples. This question comes up a lot with people who are self-taught. I had to go back and learn to use strict after coding for about a year, and I really wish I had started sooner. A few examples of how adding 'use strict' can possibly save you time: 1. You're looping through an array, using a variable inside the loop. Something fails and the variable doesn't get updated. You don't realize until hours later that all of your output is worthless because half of the loops were just repeating the same value as the loop before it. By declaring the variable using 'my' inside the loop, you can avoid this because the variable will be automatically reinitialized each time. 2. You can't figure out why your program isn't generating the expected output. You spend an hour putting debug statements throughout your script, only to find that you misspelled the name of the variable in your print statement. Perl was happy to oblige you by creating a new, empty variable with that name and printing it for you. By adding 'use strict' to the top of your script, you can avoid this because Perl will complain about the variable not being declared. Check out 'perldoc strict' for more detailed info. -Original Message- From: ZHAO, BING [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 4:20 PM To: Timothy Johnson Subject: Re: hi why do I need to specify $,%,@ using 'my', sometime I do need them to be global so that I can use their property, like scalar @shrimp to get a #, and I have beening programming for a while, and I seldom use my, and this is the 1st time unix has generated such kind of warning, why? thank you very much. bing -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
hi
Hi, I am doing this simple enough script, but somehow it generates error: open COO, 1898.inf or die Cannot open file 1898.inf:$!; @shrimp=COO; foreach @shrimp{ $squid=substr($_,0,4); $shark=$_..pdb; system \rm dali.lock; #ignore this part system dalilite ~readbrk pdb1898/$shark $squid; #ignore this part } Global symbol @shrimp requires explicit package name at ./pdbReadbrk2000.pl line 19. syntax error at ./pdbReadbrk2000.pl line 21, near foreach @shrimp Global symbol $to requires explicit package name at ./pdbReadbrk2000.pl line 21. thank you all, what did I do wrong? best, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: hi
You need to declare each variable (scalar, array, or hash) with my before you use them. This lets Perl know what scope they should have. Example: my @shrimp; foreach(@shrimp){ my $prawn = 1; do something... } -Original Message- From: ZHAO, BING [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 3:35 PM To: Perl Beginners List Subject: hi Hi, I am doing this simple enough script, but somehow it generates error: snip Global symbol @shrimp requires explicit package name at ./pdbReadbrk2000.pl line 19. syntax error at ./pdbReadbrk2000.pl line 21, near foreach @shrimp Global symbol $to requires explicit package name at ./pdbReadbrk2000.pl line 21. snip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: hi
Bing == Bing Zhao [EMAIL PROTECTED] writes: Bing system \rm dali.lock; #ignore this part But I can't. Why do you want to run a program named CR-m? As in \x0Am. As in, return followed by m. That's what \rm means. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: hi
ZHAO, BING mailto:[EMAIL PROTECTED] wrote: : I am doing this simple enough script, but somehow : it generates error: : : open COO, 1898.inf or die Cannot open file 1898.inf:$!; : @shrimp=COO; : : foreach @shrimp{ : $squid=substr($_,0,4); : $shark=$_..pdb; : : Global symbol @shrimp requires explicit package name at : ./pdbReadbrk2000.pl line 19. Declare your variables in the smallest scope possible. Read http://perl.plover.com/FAQs/Namespaces.html my @shrimp = COO; Since you are probably finished with the file now, it is a good time to close it. my @shrimp = COO; close COO; Without knowing more about your data, I would probably chomp the line endings too. chomp( my @shrimp = COO ); close COO; : syntax error at ./pdbReadbrk2000.pl line 21, near : foreach @shrimp The list or array goes in parenthesis. foreach ( @shrimp ) { Or, more likely: foreach ( @shrimp ) { my $squid = substr( $_, 0, 4 ); my $shark = $_.pdb; : Global symbol $to requires explicit package name at : ./pdbReadbrk2000.pl line 21. This error did not originate from the given code. This happens a lot when you are trying to debug and write a message at the same time. Get a good programmer's editor. It will allow you to quickly test code and cut and paste errors just before you post it to the group. Add the following to the top of your script. It will give you more detailed error messages. use diagnostics; HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: hi
Hi, Can you post the whole script. Possibly you have declared 'use strict' in your code or it has been set default. The problem is that the compiler is demanding explicit declaration of the variables that you have used. declaring @shrimp as : my @shrimp = COO; and foreach my $tuna (@shrimp) { squid=substr($tuna,0,4); ...and so on } will eliminate the error. Regards, Suvajit ZHAO, BING wrote: Hi, I am doing this simple enough script, but somehow it generates error: open COO, 1898.inf or die Cannot open file 1898.inf:$!; @shrimp=COO; foreach @shrimp{ $squid=substr($_,0,4); $shark=$_..pdb; system \rm dali.lock; #ignore this part system dalilite ~readbrk pdb1898/$shark $squid; #ignore this part } Global symbol @shrimp requires explicit package name at ./pdbReadbrk2000.pl line 19. syntax error at ./pdbReadbrk2000.pl line 21, near foreach @shrimp Global symbol $to requires explicit package name at ./pdbReadbrk2000.pl line 21. thank you all, what did I do wrong? best, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
hi
Hi, How do you INPUT the output( of a file) to the designated file? To be specific, if the file being output generates a score/number which needs to be subsequently input into another file, how to you set up the output and input? Thannks a lot. bz -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: hi
ZHAO, BING [EMAIL PROTECTED] asked: How do you INPUT the output( of a file) to the designated file? To be specific, if the file being output generates a score/number which needs to be subsequently input into another file, how to you set up the output and input? Thannks a lot. I'm not entirely sure I understood your question, but most likely you're looking for a pipe open, i.e. if( open( OUT, '|/some/command' ) ){ print OUT text is send to command; } else { die open failed: $! } This is a complicated subject that is best explained by the perlipc and perlopen manual pages. HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: hi
On Sep 26, 2005, at 22:20, ZHAO, BING wrote: Hi, How do you INPUT the output( of a file) to the designated file? To be specific, if the file being output generates a score/number which needs to be subsequently input into another file, how to you set up the output and input? Let me try to reword it. Do you have a Perl script that prints something to stdout and you want to redirect that output to some archive on disk instead of the console? If that's a right interpretation, do you want to do it from within the script or from the shell prompt? -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Hi
Hi I want to retreive from postgres database by removing the dos characters and the spaces from a perl file. It is like in the DB side there isand dos charcters in the table itself. So when I am doing a select query as it is checking in the table, the correct match is not obtained. I have TRIED after removing in the PERL side with substitution and all and confirmed this . Please give me some tips as what function I can use in the query to remove the space as well as DOS characters thanks Anish