in reply to Re: where to declare a variable...
in thread where to declare a variable...

Mea culpa.

You can't say
open FH, $file1 or $file2 or die "Rats!\n";
Stick with the earlier poster's suggestion:

$fh = $file1 || $file2; open FH, $fh or die $!; etc

Sorry 'bout that.

Rob