> I'd like to reply to your Unicode link with another link:
>
> http://stackoverflow.com/questions/6162484/why-does-modern-perl-avoid-utf-8-by-default/6163129#6163129

To which i have to say that both the Great Unicode Shootout as well as that answer are written by the same person. The point being: Yes, Perl's Unicode support is not perfect. But honestly? It's still the best you can get out there.

> >Exceptions are built in:
>
> Exceptions are built in?

The both of you are conflating two things here:

- Exception flow control
- Exception objects

The former is in fact implemented in Perl core via eval { literal code block }. In earlier versions of Perl there were issues where DESTROY blocks, called on object destruction, were able to clobber $@, i.e. the error message. Thus Try::Tiny has become the preferred method of doing exception flow control:

my $x;
try {
die 'foo';
}
catch {
warn "Got a die: $_";
}
finally {
$x = 'bar';
};

Mind, that issue has been fixed in 5.14 ( http://perldoc.perl.org/perl5140delta.html#Exception-Handlin... ), so if you're above that, you can safely use eval for your exception flow control.

> does it support "bubbling up" the exceptions over different modules?

Yes, evals can be nested.

> What if a module redefines signal handlers?

If it does it via local it won't even concern you. If it does it plainly you're in a bit of a bind, but in practice this kind of thing happens exceedingly rarely on CPAN outside of self-contained applications or testing/installing code.

> I'm also not sure how the error message can be handed
> over multiple exceptions

You die with an array reference containing the interesting exceptions.

> or how to catch different types of exeptions.

If you know what kind of exception you expect, you write code that interrogates the scalar for that. For example, if you're expecting an object of a certain type:

handle_exception( $_ ) if blessed( $_ ) and $_->isa('Exception::Parse');

> Finally, why are there myriads of Exception modules and
> Error handling modules and die/croak/carp modules

Because we're collectively still trying to decide how to best handle exceptions.

> I never came across the need of looking for a
> replacement for those in another language...

In other languages you get a solution plopped in front of you and have to accept it because you cannot even implement your own exception handling. If they got it right, great. If they didn't ... welp.

Anyhow, that was only the first part. The second part is Exception Objects, which is where a lot of the various CPAN modules come in. Since Perl does not provide a native exception object, you can return literally anything you wish and many people experimented to see which kind of exception object they wanted. The concensus for this has landed on Exception::Class.

> Another point is: Very often i came across the
> recommendation to convert the array to a hash and then
> check for the key. What recommendation is that? When i
> have a data structure that is best represented as
> array, convert it for a simple operation? ugh...

Those recommendations are bullshit and that's where you're right. However the fact that you think Perl does not have tools to search through arrays shows a glaring gap in your knowledge. As i mentioned in another comment, Perl has excellent facilities for searching through arrays:

> `my @hits = grep { $_ eq 'dogfood' } @array;`
>
> Alternatively:
>
> `use List::Util 'first'; my $has_dogfood = first { $_ eq 'dogfood' } @array;`
>
> And this is in core.