perlcritic complaints that the following code, some boilerplate DBI stuff that works perfectly fine, should croak instead of die:
# Connect to database
my $db_ha
If we called the die and croak outside the function there is no difference between these functions.
We can only find difference when we call die and croak within any other function.
croak will gives information about the caller such as function name and line number..etc. die will give error and gives the line number where the error has occured.