given
is analogous to the switch
keyword in other languages. given
and when
are used in Perl to implement switch
/case
like statements.
Only available after Perl 5.10. For example:
See Switch statements in perlsyn for detailed information.