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.1 by williamc, Mon Mar 1 10:35:01 1999 UTC vs.
Revision 1.4 by williamc, Tue Mar 23 13:47:27 1999 UTC

# Line 1 | Line 1
1 #!perl
1   #
2   # Utility Routines for the SCRAM tools
3   #
4  
5   package SCRAMUtils;
6 + require 5.001;
7   require Exporter;
8   @ISA = qw(Exporter);
9   @EXPORT = qw(checkfile updatelookup);
10   use Carp;
11  
12 < sub checkfile ($filename) {
12 > sub checkfile {
13          my $filename=shift;
14          my $thisfile="";
15          $thifile=$ENV{LOCALTOP}."/".$filename;
# 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 ) {
38                          $update=1;
39                          print SCRAMWORK $key.$rest."\n";
40                  }
41 <                print SCRAMWORK $_;
41 >                else {  
42 >                 print SCRAMWORK $_;
43 >                }
44          }
42
45          close SCRAMUPDATEFILE;
46          if ( $update==0 ) {
47                  print SCRAMWORK $key.$rest."\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines