ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/SCRAMUtils.pm
(Generate patch)

Comparing COMP/SCRAM/src/Utilities/SCRAMUtils.pm (file contents):
Revision 1.3 by williamc, Thu Mar 18 10:32:04 1999 UTC vs.
Revision 1.6 by williamc, Mon Jul 31 12:37:20 2000 UTC

# Line 12 | Line 12 | use Carp;
12   sub checkfile {
13          my $filename=shift;
14          my $thisfile="";
15 <        $thifile=$ENV{LOCALTOP}."/".$filename;
15 >        $thisfile=$ENV{LOCALTOP}."/".$filename;
16          return $thisfile, if ( -e $thisfile );
17 <        $thifile=$ENV{RELEASETOP}."/".$filename;
17 >        $thisfile=$ENV{RELEASETOP}."/".$filename;
18          return $thisfile, if ( -e $thisfile );
19          return "";
20   }
# Line 32 | Line 32 | sub updatelookup {
32          open ( SCRAMWORK, ">$filename.wk" ) or
33                  croak "Unable to open $filename.wk ".$!."\n";
34          open ( SCRAMUPDATEFILE,  $filename );
35 +        print "Searching for ".$key."\n";
36          while ( <SCRAMUPDATEFILE> ) {
37 <                if ( $_=~/^\Q$key\E/o ) {
37 >                chomp;
38 >                print $_."\n".$key."\n\n";
39 >                if ( $_=~/^\Q$key\E/ ) {
40                          $update=1;
41                          print SCRAMWORK $key.$rest."\n";
42                  }
43 <                print SCRAMWORK $_;
43 >                else {  
44 >                 print SCRAMWORK $_."\n";
45 >                }
46          }
42
47          close SCRAMUPDATEFILE;
48          if ( $update==0 ) {
49                  print SCRAMWORK $key.$rest."\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines