- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有以下可敬的 perl 脚本 x.pl
:
#!/usr/bin/env -S perl -Mstrict -wp
s/a/b/;
如果我用 ./x.pl
或 perl x.pl
运行它,它会用
Too late for "-Mstrict" option at ./x.pl line 1.
但是……为什么?我认为“为时已晚......”只是 -CSDA
或 -T
之类的问题,因为“流已经打开”。此外,shebang 行实际上不是简单地使用指定的开关调用 perl 吗?
最佳答案
-M
和 -m
开关不适用于 Perl 脚本。
#!/usr/bin/perl -Mstrict
# shebang.pl
print 42;
$ perl -Mdiagnostics shebang.pl
Too late for "-Mstrict" option at - line 1 (#1)(X) The #! line (or local equivalent) in a Perl script contains the-M, -m or -C option.
In the case of -M and -m, this is an error because those optionsare not intended for use inside scripts. Use the use pragma instead.
The -C option only works if it is specified on the command line aswell (with the same sequence of letters or numbers following). Eitherspecify this option on the command line, or, if your system supportsit, make your script executable and run it directly instead of passingit to perl.
Uncaught exception from user code:Too late for "-Mstrict" option at - line 1.
关于linux - perl shebang : `Too late for "-Mstrict"`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64884488/
路过this tutorial在 Riverpod 上使用此代码会出现错误 Unexpected text 'late' class Clock extends StateNotifier { C
我需要一个 knockout 计算函数来直接执行,但它看起来更像是 knockout 对可计算对象进行排队并在需要时执行。有没有办法(除了不使用 knockout 之外)立即执行? 我单步执行了我的代
我有这段代码: [contenteditable]:hover, [contenteditable]:focus { background: #D7D7FF;
我没有找到这方面的任何信息。可能是因为我的方法不正确。 我将我的图像绝对定位在使用全窗口宽度的 div 下。我正在使用 margin-left: 30%,因此图像始终位于距左边框 30% 的位置。其他
我正在尝试制作一个响应式单选按钮网格,其左侧带有标签“列”。使用下面的 HTML 和 CSS,使窗口变窄最终会导致 radio 按预期换行到两列,然后是一列。但是,直到他们的大部分文本都在屏幕右侧之外
我有一个多 View 进程,用户正在输入数据,并且我在整个过程中的每一步都将其保存到模型类属性中。 我使用 textFieldDidEndEditing 检查输入是否有效,如果有效,则保存输入的数据。
Dart 有“late variables”,swift 有“Implicitly Unwrapped Optionals”。 Python 有类似的东西吗? 这意味着,像 myvar: Late[s
我有以下可敬的 perl 脚本 x.pl: #!/usr/bin/env -S perl -Mstrict -wp s/a/b/; 如果我用 ./x.pl 或 perl x.pl 运行它,它会用 To
我现在正在尝试 NNBD,我想知道您是否可以使用新关键字 late和 final一起。 据我了解,late属性可以在任何地方设置。您基本上是在告诉分析器使用时它不会为空。 我认为在某些情况下这有点危险
我正在尝试为 Excel 中的加载项编写一些代码,该加载项从 SQL Server 获取一些数据。代码本身运行完美,但不知何故有些东西被损坏了。 代码似乎可以正常工作几次,然后突然触发 Excel 崩
This维基百科指出: Since the specific type of a polymorphic object is not known before runtime (in general)
处理许多需要在运行断言之前导航到特定位置的测试用例的最佳方法?例如一个流程有5个步骤,一个测试用例需要测试第5步的一部分,我该如何设置?在这个测试用例中调用前面步骤的测试用例方法,并对所有测试步骤 5
请不要误解我的“后期绑定(bind)”,我不是指通常的运行时后期绑定(bind),我指的是别的意思,找不到更好的词来形容它: 考虑到我正在为一些需要将这些值与比较器进行比较的值类型 V 处理容器(或类
我想找出 map task 的进度。如果有人可以帮助我,那就太好了!谢谢!! 最佳答案 我们可以通过两种方式监控作业中 Map 和 Reduce 的进度。 首先是网络界面。 http://pdhado
这个问题在这里已经有了答案: What do lambda function closures capture? (7 个答案) Creating functions (or lambdas) in
我是 android 的新手,我正在使用 genymotion 模拟器,但突然我在 log cat 中遇到了延迟启用检查问题,我的应用程序崩溃了。我尝试在其他模拟器上运行它,但在 log cat 中仍
1. 需求描述 有订单数据,格式为: (订单ID,用户ID,时间戳/事件时间,订单金额) 要求每隔5s,计算5秒内,每个用户的订单总金额 并添加Watermaker来解决一定程度上的数据延迟和数据乱
在 kotlin 中,我们可以检查 'late' 类型变量是否像下面这样初始化 lateinit var file: File if (this::file.isInitialized) { .
这是来自英尺米转换器的代码示例。我的问题:它不会更新当前输入,例如:如果 JTextField 中的文本是“50”,则 textField.getText() 仅给出字符串“5”,因此 双结果将是5.
我正在 Flink 中进行实时流处理,其中 Kafka 是消息队列。我正在应用 120 秒的 EventTimeSlidingWindow。和1秒的幻灯片。我还在事件时间的每一秒插入水印。 我担心的是
我是一名优秀的程序员,十分优秀!