P
Pranav Agarwal
Hi All,
Any advise, suggestion on the same will be appretiated!
I have a file that contains a very long line, When I try to open it in vi
editor, I am not able to open the full file, I get the error "line too long"
The length of the long line is 23646.
When I try to run the sed command like this
%/usr/bin/sed -e 's/\(.*\)/\1/' longfile
I get the error "Output line too long."
Above error gets solved when I use /usr/xpg4/bin/sed That is
%/usr/xpg4/bin/sed -e 's/\(.*\)/\1/' longfile
runs good.
The problem I am facing is when i try to run my a.pl i.e.
open(FH,"$ARGV[0]");
while(<FH>){
$x=$_;
$len = length($_);
print ("$len\n");
$x =~ s/(\s*)(nothingtomatch)/$1/g;
print $x;
}
My perl program hangs when the value for $_ is that particular long line.
%perl a.pl x.1
20
<H3>References</H3>
23646
^C (!!! HANGED !!!)
%
Thanks a lot in advance for any suggestions.
Regards,
-Pranav.
Any advise, suggestion on the same will be appretiated!
I have a file that contains a very long line, When I try to open it in vi
editor, I am not able to open the full file, I get the error "line too long"
The length of the long line is 23646.
When I try to run the sed command like this
%/usr/bin/sed -e 's/\(.*\)/\1/' longfile
I get the error "Output line too long."
Above error gets solved when I use /usr/xpg4/bin/sed That is
%/usr/xpg4/bin/sed -e 's/\(.*\)/\1/' longfile
runs good.
The problem I am facing is when i try to run my a.pl i.e.
open(FH,"$ARGV[0]");
while(<FH>){
$x=$_;
$len = length($_);
print ("$len\n");
$x =~ s/(\s*)(nothingtomatch)/$1/g;
print $x;
}
My perl program hangs when the value for $_ is that particular long line.
%perl a.pl x.1
20
<H3>References</H3>
23646
^C (!!! HANGED !!!)
%
Thanks a lot in advance for any suggestions.
Regards,
-Pranav.