# the die() will never get executed # because of operator precedence open my $output , ">$outfile" || die "Can't open the output file!"; # this would work: open(my $output , ">$outfile") || die "Can't open the output file!"; # and so would this: open my $output , ">$outfile" or die "Can't open the output file!";