Nov 13, 2015, 1:56 AM
Post #3 of 6
You probably need a statement like this one:
Re: [BillKSmith] given/when not working
[In reply to]
(or some higher version of Perl) to get a clean compile, but please note, as already mentioned, that this given ... when construct has been downgraded to a "highly experimental" feature status:
As previously mentioned, the "switch" feature is considered highly experimental; it is subject to change with little notice. In particular, when has tricky behaviours that are expected to change to become less tricky in the future. Do not rely upon its current (mis)implementation.
See http://perldoc.perl.org/perlsyn.html#Experimental-Details-on-given-and-when for more details.
I personally would not use this feature for any code of lasting value.