you are writing $line to NEW after the code you showed. you want to 'print NEW $line' first, then 'print NEW "test\n"'.
On Friday, April 5, 2002, at 06:57 AM, Jorge Goncalvez wrote: > Hi, I have this: > I write to a file like this: > ...... > while ($line = <OLD>< { > > if ($line=~ /^vendor-class "PXEClient" {/ ) > { > print NEW ("test") or die "je ne peux écrire dans > $nouveau : $!"; > } > > ..... > > but my file it is like this: > ..... > # PXE Class > vendor-class "PXEClient" { > > > default-lease-time 1800; > max-lease-time 1800; > option dhcp-class-identifier "PXEServer"; > > } > > and after it is like this: > testvendor-class "PXEClient" { > > > default-lease-time 1800; > max-lease-time 1800; > option dhcp-class-identifier "PXEServer"; > } > > and i wanted > > vendor-class "PXEClient" { > > test > default-lease-time 1800; > max-lease-time 1800; > option dhcp-class-identifier "PXEServer"; > } > > how can i do this ? > Thanks. > > > > -- > 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]