Re: reading files c vs perl

2009-04-16 Thread Emen Zhao
This is no surprise, regexp is a relatively heavy function, a lot of dirty work behind the scene. On Thu, Apr 16, 2009 at 2:13 PM, John W. Krahn wrote: > Emen Zhao wrote: > >> This is off topic. But I'm just curious about why "4096" is picked here. >> Is >>

Re: reading files c vs perl

2009-04-16 Thread Emen Zhao
Thank you, Chas! This is great to know. I guess I got used to taking a plethora of memory as granted. :-) --Emen

Re: reading files c vs perl

2009-04-15 Thread Emen Zhao
This is off topic. But I'm just curious about why "4096" is picked here. Is there any particular reason behind it? I guess you can even calc the lines like this - perl -0777 -wne 'print scalar ($_=~s/\n//g)' filename Thanks, Emen

Re: Reg:Regular expression

2009-04-14 Thread Emen Zhao
>> I need to replace \/user\/cce\/g_tool with the variable $temp where >> $temp=\/user\ /gowri\/rem2 $string =~ s{\\/user\\/cce\\/g_tool}{$temp} HTH, Thanks, --Emen

Re: Compressing multiple columns into one

2008-06-19 Thread Emen Zhao
Hello, How about this? my @test = qw(10 20 30 40 50); splice @test, 1, 3, $test[1]+$test[2]+$test[3]; print "@test"; Thanks, --Emen On Thu, Jun 19, 2008 at 4:05 PM, Jean-Rene David <[EMAIL PROTECTED]> wrote: > Hi, > > A little problem I encountered recently. > > I have an array of integers and