jjohhn has asked for the wisdom of the Perl Monks concerning the following question:
I get "n". When I change the split call to split(/X/,$line) I get what I expect: "|two".my $line = "oneX|twoX|threeX"; my @fields = split(/|/,$line); print "$fields[1]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: difficult to split on "|"
by saintmike (Vicar) on May 14, 2005 at 03:08 UTC | |
by jjohhn (Scribe) on May 14, 2005 at 03:11 UTC | |
|
Re: difficult to split on "|"
by gaal (Parson) on May 14, 2005 at 04:20 UTC | |
|
Re: difficult to split on "|"
by gube (Parson) on May 14, 2005 at 04:38 UTC | |
|
Re: difficult to split on "|"
by johnnywang (Priest) on May 14, 2005 at 06:08 UTC | |
|
Re: difficult to split on "|"
by Anonymous Monk on May 14, 2005 at 14:54 UTC |