Help for this page

Select Code to Download


  1. or download this
    open my $infile, '<', @ARGV[0]
       or die ....
    
  2. or download this
    while ( my $line = <INFILE>) {
        chomp $line;
    ...
    
  3. or download this
    # at the top
    use Readonly;
    ...
    elsif ( $linetype == $DOB ) {
        process_dob( $line, \%data );
    elsif ...
    
  4. or download this
    given ( determine_type( $line ) ) {
       when { $PATIENT_ID } { process_patient( $line, \%data ); }
       when { $DOB }        { process_dob( $line, \%data ); }
    ...
    
  5. or download this
    # define the process_hash near the top
    #
    ...
    #
    my $type = determine_type( $line );
    $PROCESS{$type}->( $line, \%data );