At 4:18 AM +0100 1/11/04, Odd Gripenstam wrote:
>Hi
>
>Perl seems to insert extra empty lines when I use -i with -l.
>I have seen this with 5.8.2 and 5.6.1 (from HP). 5.004_04 does not add the blank 
>lines.
>
>Is this a bug or am I doing something wrong?

Hmm.  It might be a bug.  Can you reproduce this on other platforms,
or does it only happen on VMS?  Does it happen when you do a real
in-place edit, i.e., when your -e script is more than just ""?

>
>$ perl -lpe "" test.txt
>line 1
>line 2
>$ perl -i -lpe "" test.txt
>$ diff test.txt
>************
>File USER:[GRIPENSTAM]TEST.TXT;2
>   2
>   3   line 2
>   4
>******
>File USER:[GRIPENSTAM]TEST.TXT;1
>   2   line 2
>************
>
>Number of difference sections found: 1
>Number of difference records found: 3
>
>DIFFERENCES /IGNORE=()/MERGED=1-
>   USER:[GRIPENSTAM]TEST.TXT;2-
>   USER:[GRIPENSTAM]TEST.TXT;1
>$
>
>A DUMP shows that 0 length records have been added.


-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to