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