According to the Perl documentation, in order to use given
and when
, two conditions need to be met:
- You need to
use feature "switch";
- You need Perl 5.10.1+
That should explain what you're seeing on lines 78, 83, and 88.
Regarding the warnings you're seeing on lines 89 and 90, these are tied to the use of use strict;
, and an excellent explanation of these warnings can be found here.