Вот прога с коментами
Код:
#!perl



use strict;

my $Link; * * * * # <-- some html here

my $NEW_PATH = '/images';

# <--- for test anly, remove below --->

$Link = '

<DIV align="JUSTIFY" >

 *Введите текст для страницы


 *[img]C:My Documents\01_JPG.JPG[/img]

 *[img]C:My Documents\02_JPG.JPG[/img]

 *[img]C:My Documents\03_JPG.JPG[/img]

 *[img]C:My Documents\04_JPG.JPG[/img]

 *[img]C:My Documents\05_JPG.JPG[/img]

 *[img]C:My Documents\06_JPG.JPG[/img]

 *[img]C:My Documents\07_JPG.JPG[/img]

</DIV>

';

# <--- for test anly, remove above --->



my @PicURLs = (); # <-- picture URLs here



# <-- put all IMG URLs into array -->

while($Link =~ m/<s*img.*srcs*="(.*)".*>/ig)

{

 *push(@PicURLs,$1);

}

# <--------------------------------->



# <-- change all OLD_PATH (i.e. c:My DDocuments) to NEW_PATH (i.e. /images) -->

$Link =~ s/(<s*img.*srcs*=").*[|/](.*)(".*>)/$1$NEW_PATH/$2$3/mig;

# <--------------------------------->





# <--- Print results --->

foreach my $picurl (@PicURLs)

{

 *print "$picurln";

}

print $Link,"n";