Using bareword symbols to refer to file handles is particularly evil because they are global, and you have no idea if that symbol already points to some other file handle. You can mitigate some of that risk by localizing the symbol first
It isn't particularly hard to grep for "FH" being used elsewhere in the current package. And local doesn't actually mitigate that risk much unless you only use the file handle for the duration of some short-lived subroutine (and there are no subroutines in the original code).
Oh, and it was 5.6.1 where "open my $fh" became supported. :)
- tye
In reply to Re^2: Bareword "SEEK_END" not allowed while "strict subs" in use (FH)
by tye
in thread Bareword "SEEK_END" not allowed while "strict subs" in use
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |