http://qs321.pair.com?node_id=1166654


in reply to Best option for "switch/case" functionality?

Grab the experimental.pm module from CPAN (or you may already have it if you have a recent version of Perl installed).

Then, at the top of each file add:

use experimental 'switch';

Then continue to use given/when under every version of Perl that supports it...without annoying warnings or meta-warnings.