Search Results

Search: Posts Made By: SEEHTAS
7,905
Posted By SEEHTAS
Hi Madhan, No..Its taking double the time......
Hi Madhan,

No..Its taking double the time...

Script:

#!/usr/local/bin/perl
open(FILE, "<", $ARGV[0]) || die ("unable to open <$!>\n");
while( read(FILE, $data, 1000) == 1000) {
...
7,905
Posted By SEEHTAS
Hi Madhan, Thanks..It still takes 10 mins. I...
Hi Madhan,

Thanks..It still takes 10 mins. I have one question here, if we are reading the entire file and moving one character by character won't it consume valuable memory? For eg in C we can...
7,905
Posted By SEEHTAS
Hi Madhan, Corrected code: ...
Hi Madhan,

Corrected code:

#!/usr/local/bin/perl
open(FILE, "<", $ARGV[0]) || die ("unable to open <$!>\n");
while( read(FILE, $data, 1) == 1 ) {
if((ord($data)>=32)&&(ord($data)<=126)){
...
7,905
Posted By SEEHTAS
perl script for file processing
Aim:

To scan a file and ignore all characters that has an ASCII value from 0 to 31 and 127 to 255 and accept only those characters having an ASCII between 32 and 126.

Script:
...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 08:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy