I don’t know whether my difficulty is with my perl or with my logic; but either 
way I need a fresh mind on this. 

If I test the subroutine by feeding it a file name that does not exist in any 
format, I expect it to die — but it does not.

Any good ideas will be greatly appreciated!

Rick


sub get_course_data {
    # check for course_file in .txt format; try to make one if not
    if ( (!-e "$pf{course_file}.txt" )  # if there's no .txt file
         and
         ( -e "$pf{course_file}.db"  )  # but there is a .db file
       ){
         convert_course_file();
    }
    else {
        die "Cannot find course file for $pf{course_file}";
    }

}

Reply via email to