With a tiny change we shun the use of $c. thereby a bit faster.
perl -nle 'END { print $. }' file
thanks
2008/1/22, Chas. Owens <[EMAIL PROTECTED]>:
>
> On Jan 22, 2008 2:58 PM, lerameur <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I wrote a short perl script (65 lines), simply to count some
On Jan 23, 2008 6:18 AM, lerameur <[EMAIL PROTECTED]> wrote:
> here is my program:
Have you profiled it, to find out where it's taking time?
> my $time_second1=substr($date1,-4,2);
> my $time_minute1=substr($date1,-6,2);
> my $time_hour1=substr($date1,-8,2);
> my $time_day1=substr($date1,-10,2);
On Jan 22, 7:18 pm, [EMAIL PROTECTED] (Paul Johnson) wrote:
> On Tue, Jan 22, 2008 at 05:52:35PM -0500, Chas. Owens wrote:
> > On Jan 22, 2008 2:58 PM, lerameur <[EMAIL PROTECTED]> wrote:
> > > Hello,
>
> > > I wrote a short perl script (65 lines), simply to count some log file
> > > time, and take
On Tue, Jan 22, 2008 at 05:52:35PM -0500, Chas. Owens wrote:
> On Jan 22, 2008 2:58 PM, lerameur <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I wrote a short perl script (65 lines), simply to count some log file
> > time, and take the average. The script takes 4 minutes to run and go
> > through a
lerameur wrote:
Hello,
Hello,
I wrote a short perl script (65 lines), simply to count some log file
time, and take the average. The script takes 4 minutes to run and go
through about 8 millions lines.
I would like to know if I can make it run faster. Why?, if I use the
command 'wc -l filena
On Jan 22, 2008 2:58 PM, lerameur <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I wrote a short perl script (65 lines), simply to count some log file
> time, and take the average. The script takes 4 minutes to run and go
> through about 8 millions lines.
> I would like to know if I can make it run faster