in reply to Re: foreach (@array) s/x/y/ efficiency
in thread foreach (@array) s/x/y/ efficiency
This ends up actually taking longer to run than the original. I think that's because the s/// has to fly through the entire string of $material, where the loop version (original) stops (last out of loop) when it hits the match. (Not that I would really know for sure what I'm talking about.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: foreach (@array) s/x/y/ efficiency
by chipmunk (Parson) on Jan 11, 2001 at 03:36 UTC | |
by gryphon (Abbot) on Jan 11, 2001 at 04:15 UTC |