【发布时间】:2014-04-02 08:55:51
【问题描述】:
#!/usr/bin/perl
use strict;
use warnings;
open(my $fh, '<', 'eg')
or die("Can't open fileC: $!\n");
while (<$fh>) {
perl -ne '($host, $port, @ip) = split /[=;.]/; print if $port != 50000+200*$i[2]+$ip[3]' eg;
}
在这段代码中我收到一个错误:
Bareword found where operator expected at qeg.pl line 15, near "'($host, $port, @ip) = split /[=;.]/; print if $port != 50000+200*$i[2]+$ip[3]' eg"
(Missing operator before eg?)
【问题讨论】:
-
发布真实脚本。和一些示例输入。
-
您使用的是什么操作系统和外壳? Windows上的cmd.exe?还是在 Linux 上 bash?
-
我正在使用 lunux Ubuntu。
-
你在你的程序中启动了另一个 perl 并且做错了。如果你想启动另一个 perl 使用 ``
标签: perl