Hi,
perhaps someone could shed some light on this...here's what I'm trying to do:
replace this pattern:
Berkeley
Instructor:
with this:
<br /><br /><i>Berkeley</i>
Instructor:
catch, Berkeley also appears elsewhere in file but I only want it changed
if Instructor: follows
here's the code that's not working:
-----------------------------------
8 #read in whole file
9 undef $/;
10
11 while(<>){
12 s{
13 (^Berkeley).*
14 (?=Instructor:)
15 }
16 {
17 <br /><br /><i>Berkeley</i>\n
18 }g;
19 print;
20 }
~
have also tried /Berkeley/ .. /Instructor:/
but this changes the other occurances of Berkeley that I don't want
changed ??
thanks in advance,
Pam
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>