in reply to Explicit Package?
Note that the program you showed is incomplete. It sets $^I, which is the equivalent of the -i command-line switch for in-place editing of files, it operates on the files in @ARGV, and is typically used via the magic <> operator (example). However, by writing <$in_fn> and print $out_fh, it seems you want to use explicit filehandles instead, and in that case, you need to explicitly open those files, for example open my $out_fh, '>', $out or die "$out: $!";. If you do that, then don't also set $^I, as this may have unexpected effects in other parts of the program!
|
---|