garbage777 has asked for the wisdom of the Perl Monks concerning the following question:
When I run the above code,we see there is a "blank value" for $a[0].my $l = "WINGFRAME MACH1;VECTORTHRUST 40 00 40 40;VECTORTHRUST 60 00 +40 90;VECTORTHRUST 10 40 30 10;VECTORTHRUST 80 10 10 10;VECTORTHRUST +60 10 95 00;VECTORTHRUST 70 00 60 00;VECTORTHRUST 80 00 70 90;VECTORT +HRUST 60 50 80 90;VECTORTHRUST 60 40 80 10;WINGFRAME MACH2;VECTORTHR +UST 40 00 40 40;VECTORTHRUST 60 00 40 90;VECTORTHRUST 10 40 30 10;VEC +TORTHRUST 80 10 10 10;VECTORTHRUST 60 10 95 00;VECTORTHRUST 70 00 60 +00;VECTORTHRUST 80 00 70 90;VECTORTHRUST 60 50 80 90;VECTORTHRUST 60 +40 80 10;"; my @a = split(/WINGFRAME /,$l); foreach (@a) { print $_,"\n"; } print scalar (@a),"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: split function gives emply line as output of the array element
by Anonymous Monk on Nov 09, 2009 at 06:47 UTC | |
by Anonymous Monk on Nov 09, 2009 at 07:01 UTC | |
by Anonymous Monk on Nov 09, 2009 at 07:50 UTC | |
|
Re: split function gives emply line as output of the array element
by johngg (Canon) on Nov 09, 2009 at 11:39 UTC |