develooper Front page | perl.perl5.porters | Postings from May 2004

[perl #29675] -i vs. BEGIN and END

From:
Dan Jacobson
Date:
May 18, 2004 03:18
Subject:
[perl #29675] -i vs. BEGIN and END
Message ID:
rt-3.0.9-29675-87665.1.699876836988@perl.org
# New Ticket Created by  Dan Jacobson 
# Please include the string:  [perl #29675]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29675 >


Please add a note to the -i section of the perlrun page, saying that
BEGIN and END output will not go where you expect them:

echo>z;perl -wlpi.ori -e 'BEGIN{print 1};s/^/2/;END{print 3}' z;echo ---;cat z
1
3
---
2
or fix the bug, if it is a bug.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About