http://qs1969.pair.com?node_id=646789


in reply to perl open mode

As you are reading from the file handle in list context, you advance its position until eof.

Then you print. At the former eof.

(If you had opened with +>>, you would not have been able to read anything without seeking first.)

Update: For what you want, and with a tiny bit more clarity:

open (A, '+<', "somefile.html") or die $!; s/a/b/g for my @records = <A>; seek(A, 0, 0); print A @records;

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!