mce has asked for the wisdom of the Perl Monks concerning the following question:
I know I am missing something, but what
The latter is slightly performant (about 25%), but this seems so far fetched, doesn't it?$str=" this is a string example"; @data=map { $_.="\n" } split (/\n/, $data); # equals to @data= ( $data =~ /(.*?\n)/g );
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex or split
by pike (Monk) on Feb 06, 2003 at 13:45 UTC | |
by mce (Curate) on Feb 06, 2003 at 13:51 UTC | |
|
Re: regex or split
by ihb (Deacon) on Feb 06, 2003 at 13:56 UTC | |
|
Re: regex or split
by helgi (Hermit) on Feb 06, 2003 at 14:00 UTC | |
by helgi (Hermit) on Feb 06, 2003 at 14:03 UTC | |
|
Re: regex or split
by dug (Chaplain) on Feb 06, 2003 at 15:30 UTC | |
|
Re: regex or split
by bronto (Priest) on Feb 06, 2003 at 14:14 UTC | |
|
Re: regex or split
by steves (Curate) on Feb 06, 2003 at 13:40 UTC | |
|
Re: regex or split
by mce (Curate) on Feb 06, 2003 at 13:26 UTC |