in reply to A Split Question
For example, I could say
to split $string on a comma surrounded by optional whitespace.my $string = "foo , bar"; my @pieces = split /\s*,\s*/, $string;
A regular expression is different than a substitution, though. So I'm not sure exactly what you're trying to do. Could you give a little more context for the particular problem you're working on?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: A Split Question
by perlcgi (Hermit) on May 18, 2000 at 22:59 UTC |