$cs="d:\\Perl\\Compiler_Setup.ini"; open cs or die "Cannot open $cs for read :$!"; while () { if (m/"Gimpel PC-Lint for H8]"/){ # read the line to be replaced my $line = ; # do something with it $line =~ s/1/0/; # print the new version print $line; } }