Why was the Switch module deprecated in Perl 5.12?
I know that a switch/case be made with elsif, but I don\'t like that very m
First of all, Switch is not deprecated. It's inclusion in core was deprecated in 5.12. All that means is that while Switch was bundled with Perl 5.8 and 5.10, it isn't bundled in Perl 5.14 and newer. It does NOT mean people should stop using the module. The module may still be installed from CPAN separately from perl.
Mind you, many including myself advise others to avoid using Switch, but that's independent of its deprecation from core, and it far predates 5.12. Using Switch can lead to very odd and hard to debug errors because it modifies your code before Perl sees it, all while providing minimal benefit if any at all.
For that reason, and because Perl started offering a native alternative (given-when), it was decided that Switch would no longer be bundled with perl.
Unfortunately, given-when has problems, and was retroactively marked as experimental in 5.18. It isn't safe to use these as they will be changed in a backwards-incompatible manner (or maybe removed) in the future.