BINF634_FALL14 COMPLEX DATA STRUCTURES AND PARSING52 Subroutines # open_file # # - given filename, set filehandle sub open_file { my($filename) = @_; my $fh; unless(open($fh, $filename)) { print Cannot open file $filename\n ; exit; } return $fh; } # get_next_record # # - given GenBank record, get annotation and DNA sub get_next_record { my($fh) = @_; my($offset); my($record) = ; my($save_input_separator) = $/; $/ = //\n ; $record = ; $/ = $save_input_separator; return $record; }
{}