Diff for /loncom/build/Attic/parse.pl between versions 1.1 and 1.2

version 1.1, 2000/12/05 15:30:47 version 1.2, 2000/12/07 20:34:12
Line 3 Line 3
 # Scott Harrison  # Scott Harrison
 # November 2000  # November 2000
   
 # read in loncapa tags and metagroup tags  # Read in loncapa tags and metagroup tags
   
   # -------------------------------------------- Read in command line arguments
 my ($file,$mode)=@ARGV;  my ($file,$mode)=@ARGV;
   
   # Read in master data file
 open IN,"<$file";  open IN,"<$file";
 my @lines=<IN>;  my @lines=<IN>;
 close IN;  close IN;
   
 my $info=join('',@lines);  my $info=join('',@lines);
 my $info2=$info; # value to allow for meta data group retrieval  my $info2=$info; # value to allow for meta data group retrieval
   
 my %ihash; # big data storage object  my %ihash; # big data storage object
 while ($info=~/\<loncapa\s+(.*?)\>/isg) {  while ($info=~/\<loncapa\s+(.*?)\>/isg) {
     my $keystring=$1;      my $keystring=$1;
     my %hash=map {my ($key,$value)=split(/\=(?!")|\=(?=\s*"[^"]*"[^"]*$)/); $value=~s/^"//; $value=~s/"$//;(uc($key),$value);} split(/\s+(?=\w+\s*\=)/,$keystring);      my %hash=map {my ($key,$value)=split(/\=(?!")|\=(?=\s*"[^"]*"[^"]*$)/);
                                      $value=~s/^"//;
       $value=~s/"$//;
                                      (uc($key),$value);}
                split(/\s+(?=\w+\s*\=)/,$keystring);
     if (uc($hash{'TYPE'}) eq "OWNERSHIP") {      if (uc($hash{'TYPE'}) eq "OWNERSHIP") {
         $info{$hash{'TYPE'}}{$hash{'CATEGORY'}}{'CHMOD'}=$hash{'CHMOD'};          $info{$hash{'TYPE'}}{$hash{'CATEGORY'}}{'CHMOD'}=$hash{'CHMOD'};
         $info{$hash{'TYPE'}}{$hash{'CATEGORY'}}{'CHOWN'}=$hash{'CHOWN'};          $info{$hash{'TYPE'}}{$hash{'CATEGORY'}}{'CHOWN'}=$hash{'CHOWN'};

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>