my $fd_out; open($fd_out, $what_file); while (<$fd_out>) { # ... }