Thanks Danny

I must be doing something else wrong, I bet its variable scope, Im just getting my 
head around it


Colin

-----Original Message-----
From: Danny Miller [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 17:13
To: Johnstone, Colin
Subject: RE: Regex help!!


Your regex is right, the substitution works...on my system at least.

Regards,

Danny

-----Original Message-----
From: Johnstone, Colin [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 1:06 AM
To: '[EMAIL PROTECTED]'
Subject: FW: Regex help!!


Further to my previous message.

after fixing the ~= I get the following.

I know $screenOutput has a value because I see the html contained in the
file Im reading on the screen its just not doing the substitution.

please advise.

Colin 

-----Original Message-----
From: Johnstone, Colin 
Sent: Monday, December 02, 2002 17:00
To: '[EMAIL PROTECTED]'
Subject: Regex help!!


Hi all,

Im reading in a file line by line and I want to look for the occurence of
this string 
<!-- response here --> in $line. Is this the right way to do it. If it finds
it it is to inser the value of $screenOutput in its place.

if($screenOutput ne ""){
my $responsePage = "";
open(IN, "<$locationResponsePageSkin") or die("Cannot open: $!");
while( my $line = <IN>){
$line ~= s/<!-- response here -->/$screenOutput/;
$responsePage .= $line;
}
close(IN);
print $responsePage;
}


Colin Johnstone 
Website Project Officer 
Corporate Website Unit 
Public Affairs Directorate 
ph 9561 8643 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to