DAMN DAMN DAMN those lexical filehandles

print FH unless ()  # was working fine
but
    print $fh unless () # doesn't

instead of printing $_ to $fh, it prints $fh to STDOUT.  DAMN DAMN DAMN
This commit is contained in:
Sitaram Chamarty 2009-08-25 21:47:12 +05:30
parent 7a9bf9c296
commit cb5a802d3e

View file

@ -208,7 +208,7 @@ open my $newkeys_fh, ">", $ENV{HOME} . "/.ssh/new_authkeys"
# save existing authkeys minus the GL-added stuff # save existing authkeys minus the GL-added stuff
while (<$authkeys_fh>) while (<$authkeys_fh>)
{ {
print $newkeys_fh unless (/^# gitosis-lite start/../^# gitosis-lite end/); print $newkeys_fh $_ unless (/^# gitosis-lite start/../^# gitosis-lite end/);
} }
# add our "start" line, each key on its own line (prefixed by command and # add our "start" line, each key on its own line (prefixed by command and