Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

RE: Extract and modify IMG SRC tags in an HTML document.

by johncoswell (Acolyte)
on Apr 27, 2000 at 18:01 UTC ( #9399=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://9399]
help
Chatterbox?
[stevieb]: I just received full professional license for ALL of JetBrains software due to requesting their opensource request form! I wanted only CLion, but they give them all
[stevieb]: I stated I use IDEA for Perl work, and at work, licensed version of PyCharm
[beech]: is that a good thing?

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-02-20 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (302 votes). Check out past polls.