Re: search and replace on an array
- From: "ebm" <ebmarquez@xxxxxxxxx>
- Date: 30 Jun 2006 08:51:00 -0700
Yeah, I know it can be done that way too, but that's not what I'm
really looking for.
This is a part of a larger script and I'm not going to rewrite the
whole this for this.
do you have any ideas on how to search and replace on an array?
Thanks!
David Squire wrote:
David Squire wrote:
Why do you want to do this? Why not just interpolate the directory path
and filename into a string at the time it is needed, e.g.:
for my $Dir ('c:/path/to', 'd:/new/path') { # note you don't need to use
Windows style slashes
for my $File ('File1', 'File2') {
open my $FileHandle, "$Dir/$File", '<' or die "Can't open
$Dir/$File:$!";
Whoops! That should be:
open my $FileHandle, '<', "$Dir/$File" or die "Can't open $Dir/$File:$!";
# ... do stuff
}
}
.
- Follow-Ups:
- Re: search and replace on an array
- From: Jim Gibson
- Re: search and replace on an array
- From: David Squire
- Re: search and replace on an array
- 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
- search and replace on an array
- Prev by Date: Re: search and replace on an array
- 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
|
|