Re: practical perl guides

2011-05-26 Thread Sayth Renshaw
On Fri, May 27, 2011 at 3:35 PM, Sayth Renshaw wrote: > On Fri, May 27, 2011 at 3:30 PM, shawn wilson wrote: >> On May 27, 2011 1:28 AM, "shawn wilson" wrote: >>> >>> >>> On May 27, 2011 12:21 AM, "Sayth Renshaw" wrote: >>> > >>> > Hi >>> > >>> > Wanted to ask a question about practical beginne

Re: perl as command line

2011-05-26 Thread vishesh kumar
Thanks Jim Now i understood completely. Very good explanation. On Fri, May 27, 2011 at 10:45 AM, Jim Gibson wrote: > At 10:28 AM +0530 5/27/11, vishesh kumar wrote: > >> Hi Jim >> > > You should address all of your questions to the list as a whole. That way > you will get smarter people than

Re: practical perl guides

2011-05-26 Thread shawn wilson
On May 27, 2011 1:28 AM, "shawn wilson" wrote: > > > On May 27, 2011 12:21 AM, "Sayth Renshaw" wrote: > > > > Hi > > > > Wanted to ask a question about practical beginners guides for perl. > > How about the 10 or so docs that 'perldoc perldoc' references. Or you can download 'modern perl' for fre

Re: practical perl guides

2011-05-26 Thread shawn wilson
On May 27, 2011 12:21 AM, "Sayth Renshaw" wrote: > > Hi > > Wanted to ask a question about practical beginners guides for perl. How about the 10 or so docs that 'perldoc perldoc' references. Or you can download 'modern perl' for free - can't comment much on the book because I haven't read much of

Re: perl as command line

2011-05-26 Thread Jim Gibson
At 10:28 AM +0530 5/27/11, vishesh kumar wrote: Hi Jim You should address all of your questions to the list as a whole. That way you will get smarter people than me helping you. echo $str | perl -pe 's/.*?(\d+\.[\d.]+).*/$1/' Giving desired result, but i wonder what is use of ? in this exp

Re: perl as command line

2011-05-26 Thread vishesh kumar
Hi Jim echo $str | perl -pe 's/.*?(\d+\.[\d.]+).*/$1/' Giving desired result, but i wonder what is use of ? in this expression On Tue, May 24, 2011 at 11:59 AM, Jim Gibson wrote: > At 9:41 AM +0530 5/24/11, vishesh kumar wrote: > >> Hi Members, >> >> I am a linux system admin. I want to use

practical perl guides

2011-05-26 Thread Sayth Renshaw
Hi Wanted to ask a question about practical beginners guides for perl. I have found a read the baisc beginners guides here http://www.perl.com/pub/2008/05/07/beginners-introduction-to-perl-510-part-2.html. Was hoping to expand on this with some practical and hands on guides to perl. personally I

practical perl guides

2011-05-26 Thread Sayth Renshaw
Hi Wanted to ask a question about practical beginners guides for perl. I have found a read the baisc beginners guides here http://www.perl.com/pub/2008/05/07/beginners-introduction-to-perl-510-part-2.html. Was hoping to expand on this with some practical and hands on guides to perl. personally I

practical perl guides.

2011-05-26 Thread Sayth Renshaw
Hi Wanted to ask a question about practical beginners guides for perl. I have found a read the baisc beginners guides here http://www.perl.com/pub/2008/05/07/beginners-introduction-to-perl-510-part-2.html. Was hoping to expand on this with some practical and hands on guides to perl. personally I

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread charley
On May 26, 5:44 am, jason.li...@gmail.com (Xi Liu) wrote: > I know I am doing the repetitive and useless summing again and again. What > confuses me is that using the same algorithm, I mean > >  for my $i (99 .. 6) > { >       my $sum; >       map {$sum += $_->{foo_value}} @lines[$i - $n + 1 ..

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread C.DeRykus
On May 25, 10:05 pm, jason.li...@gmail.com (Xi Liu) wrote: > Hi all: > I translated a program from c to perl.but the perl program cost 15 seconds > compare to the original c one cost only less than 1 second, I guess this > might be the result of I literally translated the program, using a lot of >

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread Xi Liu
OK, I think I got the idea. I am going to change the useless code caching the result I have already summed or inline c code to achieve a better performance. Really learned something. Thank you!

Re: Message queue

2011-05-26 Thread shawn wilson
On Thu, May 26, 2011 at 14:10, Leo Lapworth wrote: > On 26 May 2011 09:43, shawn wilson wrote: >> I'm trying to figure out what the differences are with all of the available >> message queue projects. > > There has recently been a discussion on London.pm's mailing list: > > http://london.pm.org/p

Re: Message queue

2011-05-26 Thread Leo Lapworth
On 26 May 2011 09:43, shawn wilson wrote: > I'm trying to figure out what the differences are with all of the available > message queue projects. There has recently been a discussion on London.pm's mailing list: http://london.pm.org/pipermail/london.pm/Week-of-Mon-20110523/020651.html Thread ov

Re: Message queue

2011-05-26 Thread shawn wilson
On Thu, May 26, 2011 at 11:23, Tim Lewis wrote: > Shawn, are you looking for something to send messages from Perl scripts > instead of an SMTP setup? > Tim > doing web stuff (commit) with it. i'm currently using AnyMQ just because that's what was used in the examples for Web::Hippie and xdfighter

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread Uri Guttman
> "XL" == Xi Liu writes: XL> I know I am doing the repetitive and useless summing again and again. What XL> confuses me is that using the same algorithm, I mean XL>  for my $i (99 .. 6) XL> { XL>       my $sum; XL>       map {$sum += $_->{foo_value}} @lines[$i - $n + 1 .. $i]

RE: Message queue

2011-05-26 Thread Tim Lewis
Shawn, are you looking for something to send messages from Perl scripts instead of an SMTP setup? Tim -Original Message- From: shawn wilson [mailto:ag4ve...@gmail.com] Sent: Thursday, May 26, 2011 4:44 AM To: beginners@perl.org Subject: Message queue I'm trying to figure out what the dif

Re: How to execute xxx.sql in DBI in perl

2011-05-26 Thread Abhinav Kukreja
you can open the .sql file and store the contents in a perl variable (lets say $SQL) and then execute the command. On Thu, May 26, 2011 at 3:28 PM, Woo, Hye Jin wrote: > Would you help me how to execute like @xx.sql in PL/SQL in perl? > > If I do not execute select query, I want to get the query

How to execute xxx.sql in DBI in perl

2011-05-26 Thread Woo, Hye Jin
Would you help me how to execute like @xx.sql in PL/SQL in perl? If I do not execute select query, I want to get the query result using by x.sql file. It mean that I want to execute x.sql file after connecting oracle, then I want to get the output. Is it possible or not ? use DBI; ... ..

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread Xi Liu
I know I am doing the repetitive and useless summing again and again. What confuses me is that using the same algorithm, I mean for my $i (99 .. 6) { my $sum; map {$sum += $_->{foo_value}} @lines[$i - $n + 1 .. $i]; push @res, $sum; } in perl and for(int i =99; i <= 6;

Message queue

2011-05-26 Thread shawn wilson
I'm trying to figure out what the differences are with all of the available message queue projects. There's spread, rabbit, amq and a dozen+ others. I'm not sure how polarized this subject is so maybe I should just ask what I should look for and what I should look out for? I don't know why is choos

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread Uri Guttman
> "XL" == Xi Liu writes: XL> Thanks for your help! XL> I am sorry I missed something important in the code snippet. XL> for($i = 0; $i < @lines; $i++) XL> { XL> $sum = 0; XL> $sum += $lines[$_]->{foo_value} for ($i - $n + 1 .. $i); XL> push @res, $sum; XL> }

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread Xi Liu
Thanks for your help! I am sorry I missed something important in the code snippet. for($i = 0; $i < @lines; $i++) { $sum = 0; $sum += $lines[$_]->{foo_value} for ($i - $n + 1 .. $i); push @res, $sum; } this is what I intend.I try to make it clear and removed something so that change