I don't have a problem with the repeated or die.
If you wrote tests to accompany your script, e.g. using Test::Exception, that would certainly add elegance to it.
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]