[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.65, Tue Sep 19 19:28:48 2006 UTC revision 1.66, Tue Sep 26 13:37:07 2006 UTC
# Line 1457  Line 1457 
1457  =item lines  =item lines
1458    
1459  Reference to a list of text lines. The lines will be written to the file in order, with trailing  Reference to a list of text lines. The lines will be written to the file in order, with trailing
1460  new-line characters.  new-line characters. Alternatively, may be a string, in which case the string will be written without
1461    modification.
1462    
1463  =back  =back
1464    
# Line 1468  Line 1469 
1469      my ($fileName, $lines) = @_;      my ($fileName, $lines) = @_;
1470      # Open the output file.      # Open the output file.
1471      my $handle = Open(undef, ">$fileName");      my $handle = Open(undef, ">$fileName");
1472      # Write the lines.      if (ref $lines ne 'ARRAY') {
1473            # Here we have a scalar, so we write it raw.
1474            print $handle $lines;
1475        } else {
1476            # Write the lines one at a time.
1477      for my $line (@{$lines}) {      for my $line (@{$lines}) {
1478          print $handle "$line\n";          print $handle "$line\n";
1479      }      }
1480        }
1481      # Close the output file.      # Close the output file.
1482      close $handle;      close $handle;
1483  }  }

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3