in reply to Re: Substitution on string held in a variable
in thread Substitution on string held in a variable

Hi,

Sorry about my English, I have no excuse, just lazyness.

Thanks for pointing out my two errors.

This now works perfectly:

#!/usr/bin/perl @filelist =("includes.cgi","connect.cgi","commit.cgi"); print "Content-type:text/html\n\n"; foreach $filelist (@filelist){ $path = $ENV{'SCRIPT_FILENAME'}; $path =~ s/filelist\.cgi/$filelist/gi; print "$filelist -- $path<br />"; }


Thanks again

Sid