Preethi schreef:

> The below solution

... should be above, but most probably snipped.
Don't top-post, quote only relevant text, reply on each part that you
quote.


> did not work for me. My file runs almost to 1GB.

What was the error message?


Also show us the output of this:

perl -wne '
   $x ||= 0; $x = length if $x < length }
 { print "Lines: $.\n", "Max.len: $x\n"
' filename



> All I have the string mentioned below.
> I even tried the following option
>
> perl -pi.bak -0777 -e 's/ab=test1,
> db=test2,dc=test3/ab=chk1,bc=chk2/gi' filename.
>
> But  it did not work. I also tried using -m. It failed.

Such trial-and-error will get you nowhere.

The -0777 "works" the same as the "local $/", see:
$ perl -MO=Deparse -0777 -e ''
BEGIN { $/ = undef; $\ = undef; }


perlrun says:
-m module executes "use" module "();" before executing
   your program.

-- 
Affijn, Ruud

"Gewoon is een tijger."



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to