@output = $timestamp .'.sql'; open(my $fh, '>', @output) or die "Could not create file '@output': $!"; #### $output = $timestamp .'.sql'; open(my $fh, '>', $output) or die "Could not create file '$output': $!"; #### open(my $fn, '<', $filename) ... #### open(my $fn, '<', "$directory/$filename") ...