Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
  2. or download this
    open(file1,"file1.txt") || die ("cannot open file");
    
  3. or download this
    open my $file1, '<', "file1.txt" or
      die "Can't open `file1.txt': $!\n";
    
  4. or download this
    while (<file1>)
       {
          chop();
    
  5. or download this
          $REC     = $_;
          @LINEREC = split(/\,/,$REC);
          $data1 = @LINEREC[0];
    
  6. or download this
    while (<$file1>)
       {
          chomp;
          my $data1 = (split /,/)[0];
          # ...
    
  7. or download this
       open(file2,"file2.txt") || die ("cannot open file");
    
  8. or download this
    #!/usr/bin/perl -l
    
    ...
    }
    
    __END__