Help for this page

Select Code to Download


  1. or download this
    # need to chomp the file input before testing
    $found = 1 if /^$student\t$studentAge$/;
    
  2. or download this
    my $text = "$student\t $studentAge\n";
    my $found = 0;
    while (<$fh>) {
       $found = 1 if $_ eq $text;
    }
    
  3. or download this
    # Read the file into a hash
    #
    ...
           print $fh, "$output\n";
        }
    }