A quick solution....May be you can enhance it more as you like..
@discarr = ('/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003
Ent x64)/AN-DC (Win2003 Ent
x64).vmx','/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent
x64)/Disc 1.vmdk','/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC
(Win2003 Ent x64)/Disc 2.vmdk');
$replace = "REPLACESTRING";
foreach $disc(@discarr){
print "Before $disc \n";
$disc =~ s/\/vmfs\/volumes\/(.*?)\//\/vmfs\/volumes\/$replace\//gi;
print "After $disc \n";
}
Hope this helps.
Thanks,
Prabu.M.A
"Joseph L. Casale" <[EMAIL PROTECTED]> wrote:
I have an array with the following data in it:
/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/AN-DC
(Win2003 Ent x64).vmx
/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/Disc
1.vmdk
/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/Disc
2.vmdk
I always deal with indices' 1 through to the end in the function in question,
so it's easy to get the second indices (First disc) and so on. I need to
manipulate the path though now, I am wanting to search for *all* the text
following the third "/" and before the fourth "/" and replace it with a string
variable. So far, this is seeming to be way over my current capacity :)
Can anyone point me to the topic/method I should use so I may read up on build
this myself?
Thanks!
jlc
---------------------------------
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.