如何将参数传递给 perl 脚本

How to pass an argument to a perl script

 my @return = `at now +3 days -f test2.pl myargument 2>&1`;

如何将我的参数传递给我的脚本 test2.pl?在该代码中 returns 一个错误。

根据我系统上 at 的文档,它从 -f 或 STDIN 指定的文件中读取要执行的 bourne shell 命令。

因此,以下应该可以解决问题:

`printf %s 'test2.pl myargument' | at now +3 days 2>&1`;