herby1620 has asked for the wisdom of the Perl Monks concerning the following question:
A line in my code says:
and this works WONDERFUL. I have no problems with it. It has been running for many months. Now the boss wants to have all the code in the respoitory scanned with Perl::Critic, which I generally accept as a "good thing" (use proper Martha Stewart voice here).open (TagPrint::THELOG, ">&STDOUT") or die "dup: $!";
The problem is that the line barfs for a couple of reasons:
1) A bareword file handle and
2) Two argument open.
My question: What is the 'fix'? From the stuff I read, if I want to duplicate a file handle, I should use the two argument form. Also, what do I quote to get around the 'bareword' complaint. The idea was to keep the file handle inside the module (TagPrint) since it is very localized.
Suggestions??
Back to
Seekers of Perl Wisdom