Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I would like to be able to access the part of split that goes into $keep directly and avoid the $junk variable all together. Any thoughts? Additional info: I am running ActivePerl 5.8.1 Build 807 on Win2K.my $string="part of string to keep|part of string to toss"; my ($keep,$junk)=split /\|/, $string; print "$keep\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using split without $junk
by dragonchild (Archbishop) on Nov 24, 2003 at 18:33 UTC | |
by Anonymous Monk on Nov 24, 2003 at 18:55 UTC | |
|
Re: using split without $junk
by LTjake (Prior) on Nov 24, 2003 at 18:31 UTC | |
|
Re: using split without $junk
by Limbic~Region (Chancellor) on Nov 24, 2003 at 18:28 UTC | |
|
Re: using split without $junk
by davido (Cardinal) on Nov 24, 2003 at 18:37 UTC | |
by jeffa (Bishop) on Nov 24, 2003 at 18:48 UTC | |
by davido (Cardinal) on Nov 24, 2003 at 18:53 UTC |