> > #!/usr/bin/perl
> > ## set up for output to be sent to browser
> > print "Content-type: text/html\n\n";
> > ## read in mp3store.html
> > if (open (INFILE, "<../../mp3store.htm"))
> > {
> >  foreach $line (<INFILE>)
> >  {
> >   $line =~ tr/images\//..\/..\/images\//
> 
> $line =~ s/images\//\.\.\/\.\.\/images/g;

Leaning toothpicks! You don't need to escape the '.' on the replacement
string side because they are literal '.' characters there. Changing the
delimiter to something other than '/' will eliminate the need to escape
the '/' characters as well.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to