[LON-CAPA-cvs] cvs: loncom /interface lonspreadsheet.pm

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 21 Nov 2002 19:26:34 -0000


matthew		Thu Nov 21 14:26:34 2002 EDT

  Modified files:              
    /loncom/interface	lonspreadsheet.pm 
  Log:
  Another each -> foreach conversion.
  
  
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.146 loncom/interface/lonspreadsheet.pm:1.147
--- loncom/interface/lonspreadsheet.pm:1.146	Thu Nov 21 14:05:18 2002
+++ loncom/interface/lonspreadsheet.pm	Thu Nov 21 14:26:34 2002
@@ -1,5 +1,5 @@
 #
-# $Id: lonspreadsheet.pm,v 1.146 2002/11/21 19:05:18 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.147 2002/11/21 19:26:34 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2316,7 +2316,8 @@
     $sheet->{'maxrow'} = 0;
     my %existing=();
     # Now obsolete rows
-    while (my ($cell, $formula) = each (%f)) {
+    foreach my $cell (keys(%f)) {
+        my $formula = $f{$cell};
         next if ($cell !~ /^A(\d+)/);
         $sheet->{'maxrow'} = $1 if ($1 > $sheet->{'maxrow'});
         my ($usy,$ufn)=split(/__&&&\__/,$formula);