in reply to die and subroutine combo
Simply use the comma operator between your die and your call to mysub() like so:
sub mysub { mail stuff here.. } open(TMPFILE,"<datafile.txt") || die "Cant open: $!", mysub(); [download]