Error: Bareword “params” not allowed while “strict subs”

我怕爱的太早我们不能终老 提交于 2020-01-14 14:59:07

问题


After clicking on a submit button, I am getting an error:

Bareword "params" not allowed while "strict subs" in use at /var/www/path/get.pl line 71

Line 71:

my @names = params;

I do have use strict; nearly at the top.

How to fix?

Note: It work on the old server, I am moving all the files to a new server. Not sure where it went wrong?


回答1:


params is most likely a name of a subroutine that was supposed to be imported from another module (based on style, possibly a constant which in Perl is implemented as a subroutine as well).

Search the rest of your code for both sub params and simply my.*params regexes on the old server, and make sure whichever file declares them is present on the new one..



来源:https://stackoverflow.com/questions/13517270/error-bareword-params-not-allowed-while-strict-subs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!