Perl wrongly complaining about Name “main::FILE” used only once

后端 未结 1 1441
自闭症患者
自闭症患者 2021-01-14 16:57

I simplified my program to the following trivial snippet and I\'m still getting the message

Name \"main::FILE\" used only once: possible typo...

<
相关标签:
1条回答
  • 2021-01-14 17:21

    According to the documentation for autodie:

    BUGS

    "Used only once" warnings can be generated when autodie or Fatal is used with package filehandles (eg, FILE ). Scalar filehandles are strongly recommended instead.

    I get the warning on Perl 5.10.1, but not 5.16.3, so there may be something else going on as well.

    0 讨论(0)
提交回复
热议问题