I am using syntax checking to see whether my Perl script is being used in the correct way. If the syntax is not correct, I display a message saying what the correct syntax is, a
print prints to STDOUT but die prints to STDERR
print
STDOUT
die
STDERR
exit 1 exits with exit status of 1 but die exits with exit current value of errno that is $!
exit 1
1
errno
$!
Hence die is the preferred way as its simpler and shorter.