为什么我收到这个错误?
use strict;
use warnings;
my $str = <<str;
88087 23/11/2010
35192 25/07/2010
B3J 5X9 17/08/2011
C8U 5L6 16/08/2011
F4Q 3B4 17/10/2010
D3X 9P4 11/05/2010
O7L 6Z8 28/02/2010
W8L 9P2 05/09/2010
str
print $str;
my @arr = split/\n/,$str;
foreach (@arr) {
my @tmp = split/\t/;
print "$tmp[1]\n";
}
最佳答案
你不应该在这里有空格:
str
^
继承人终止符应该单独在一条线上,并且不应该有任何东西(甚至没有空格)围绕它。
关于perl - 在 EOF 之前的任何地方都找不到字符串终止符 "str",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4049855/