- or download this
open FILE,"filename";
read FILE,$file,100000;
close FILE;
- or download this
@lines = split(/\<IMG/,$file);
- or download this
$newfile = shift @lines;
- or download this
foreach $line (@lines) {
$pos = index($line,'>');
...
$tag =~ s/SRC\=\"(.*?)\"/SRC\=\"$newurls{$1}\"/gi;
$newfile .= $tag . $restofline . "\n";
}
- or download this
print $newfile;