http://qs321.pair.com?node_id=297571


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();

cp
----
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."