H
Huajian Luo
Hi there,
I'm now parse a output from a command which need use split to
split each line to array and get the fields like the following
pseudo code.
for my $line (@lines) {
if ($line =~ /mb_setno/) {
$line =~ s/\s//;
my @fields = split(/\s+/, $line);
my $100th_fld = $fields[99];
}
}
Cause the fields is too much, I wanna skip the @fields by just
my $100th_fld = split(/\s+/, $line){99}; or sth like that, but
it didn't work, does any guys tried this or still any hints on
this.
I'm now parse a output from a command which need use split to
split each line to array and get the fields like the following
pseudo code.
for my $line (@lines) {
if ($line =~ /mb_setno/) {
$line =~ s/\s//;
my @fields = split(/\s+/, $line);
my $100th_fld = $fields[99];
}
}
Cause the fields is too much, I wanna skip the @fields by just
my $100th_fld = split(/\s+/, $line){99}; or sth like that, but
it didn't work, does any guys tried this or still any hints on
this.