in reply to No print after closing FH

select returns the currently selected filehandle, so cache it and select it again:

open FH, "> filename.txt" or die "Cannot open filename.txt: $!"; my $curr_fh = select (FH); # do your stuff; select $curr_fh; # now you can print!

Cheers,
Ovid

Looking for work. Here's my resume. Will work for food (plus salary).
New address of my CGI Course.

Replies are listed 'Best First'.
Re: Re: No print after closing FH
by Anonymous Monk on Jul 01, 2003 at 18:10 UTC
    thanks for quick answers. It now works!