time consuming)
José Pedro Silva Pinto
-Original Message-
From: Rodrigo Tavares [mailto:[EMAIL PROTECTED]
Sent: terça-feira, 27 de Março de 2007 15:57
To: beginners@perl.org
Subject: Files manipulation
Hello,
What's the more fast ?
1) perl -pi -e 's/foo/bar/g' file.t
On 3/27/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote:
What's the more fast ?
1) perl -pi -e 's/foo/bar/g' file.txt
2) open the file and make modifications
What happens when you time both programs? It may be that the answer
for me with my data on my hardware is different than the answer for
Hello,
What's the more fast ?
1) perl -pi -e 's/foo/bar/g' file.txt
2) open the file and make modifications
In C/C++ manipulation of files are operations very
weighed. Slow perfomace.
Best regards,
Rodrigo Faria Tavares
__
Fale com seus ami
Rafaqat Ali Chaudhary wrote:
> Got another problem:
>
> Following line of code fails if directory contains more than 1400
> or so files:
>
> 1. my @filelist = glob("input/switch1*.evt");
>
> Any help will be highly appreciated.
>
The following code will do the same thing.
use strict;
use warn
Rafaqat Ali Chaudhary wrote:
>
> Got another problem:
>
> Following line of code fails if directory contains more than 1400 or so
> files:
>
> 1. my @filelist = glob("input/switch1*.evt");
>
> Any help will be highly appreciated.
On some versions of Perl the glob operator uses the shell (csh A
PROTECTED]
Sent: Sunday, July 13, 2003 03:57
To: 'John W. Krahn'; [EMAIL PROTECTED]
Subject: RE: Hex files manipulation problem
That's Great.
Using binmode has solved my problem. Yes the data files were created at
a big-endian SPARC machine and were FTPed to a little-endian Int
ECTED]
Sent: Sunday, July 13, 2003 03:41
To: [EMAIL PROTECTED]
Subject: Re: Hex files manipulation problem
Rafaqat Ali Chaudhary wrote:
>
> Following is the code:
>
> 1.open(FILE, "< $l_file") ||
> 2.die "Unable to open data file ($l_file)";
Rafaqat Ali Chaudhary wrote:
>
> Following is the code:
>
> 1.open(FILE, "< $l_file") ||
> 2.die "Unable to open data file ($l_file)";
You should include the $! variable in your error message so you know why
the error occurred.
To make this code portable across different platform
at Linux 7 and Windows 2000
Advance Server.
Rafaqat Ali Chaudhary
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 13, 2003 03:32
To: [EMAIL PROTECTED]
Subject: Re: Hex files manipulation problem
Rafaqat Ali Chaudhary wrote:
> Hi every body,
>
> I&
Rafaqat Ali Chaudhary wrote:
> Hi every body,
>
> I've got here a script which extracts event logs from Hexadecimal
> files by parsing them for a certain pattern set. The script runs
> fine on Solaris 8 (running on a SUN box) but fails on Linux or a
> Windows box.
Hi.
Look at all that John mentio
Rafaqat Ali Chaudhary wrote:
>
> Hi every body,
Hello,
> I've got here a script which extracts event logs from Hexadecimal files
> by parsing them for a certain pattern set. The script runs fine on
> Solaris 8 (running on a SUN box) but fails
How does it fail? What does it do when it fails? A
Hi every body,
I've got here a script which extracts event logs from Hexadecimal files
by parsing them for a certain pattern set. The script runs fine on
Solaris 8 (running on a SUN box) but fails on Linux or a Windows box.
Somebody please guide me in this regard. Thanks in advance.
Rafaqat Ali
12 matches
Mail list logo