find a matched line index in perl
foreach(0..$#array2){
chomp($_);
#print "$_\n";
if($array2[$_]=~/model\s+/i){
$line_index=$_;
print "$line_index, and $array2[$_]";
next;
}
}
foreach(0..$#array2){
chomp($_);
#print "$_\n";
if($array2[$_]=~/model\s+/i){
$line_index=$_;
print "$line_index, and $array2[$_]";
next;
}
}
发表者
精神家园
at
1:19 PM
No comments:
Post a Comment