open my $logfile, '>>', $ENV{HOME} . q{/bin/git-shell-wrapper.log} || die "Could not open log file!\n";
The die expression in the quoted statement can never be executed due to considerations of precedence WRT the || operator. Workable variations would be
open(my $logfile, '>>', $ENV{HOME} . q{/bin/git-shell-wrapper.log}) || die "Could not open log file!\n";
(added grouping parentheses) or
open my $logfile, '>>', $ENV{HOME} . q{/bin/git-shell-wrapper.log} or die "Could not open log file!\n";
(use super-low precedence or operator vice || operator (update: this is the current idiomatic usage)). See perlop.
Give a man a fish: <%-{-{-{-<
In reply to Re: Perl, Git and SSH! Security Concerns
by AnomalousMonk
in thread Perl, Git and SSH! Security Concerns
by mikkoi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |