Re: search and replace on an array
- From: Uri Guttman <uri@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 15:22:07 -0400
"DS" == David Squire <David.Squire@xxxxxxxxxxxxxxxxxxxx> writes:
DS> @PathFiles = map { $_ =~ s/^\Q$path\E/$newPath/; $_ } @PathFiles;
that is much cleaner with the for modifier:
s/foo/bar/ for @list ;
uri
--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
.
- References:
- search and replace on an array
- From: ebm
- Re: search and replace on an array
- From: David Squire
- Re: search and replace on an array
- From: David Squire
- Re: search and replace on an array
- From: ebm
- Re: search and replace on an array
- From: David Squire
- search and replace on an array
- Prev by Date: Re: Professional IDE for a cross-platform Perl application
- Next by Date: Re: A question of speed
- Previous by thread: Re: search and replace on an array
- Next by thread: Re: search and replace on an array
- Index(es):
Relevant Pages
|