...but the input filehandle stopped at the original eof
Presumably just the usual Suffering from Buffering. Adding $fh_out->autoflush(1); (after having opened the output file) should make things behave as you expect (fill the file with letters up to 'z'). You also need to load IO::Handle for the autoflush method to be available — i.e. -MIO::Handle if you want to stick with your one-liner :)
BTW, there is nothing special with lexical filehandles in this regard, the piece of code would work just as well with normal filehandles like IN, OUT.
In reply to Re^2: read from a file and write into the same file
by almut
in thread read from a file and write into the same file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |