use strict; use warnings; use feature qw(switch); my $foo = 'foo'; my $bar = 'bar'; my $baz = 'baz'; given($foo, $bar, $baz){ when($foo eq 'check' and $bar eq 'treck'){print "neither is standard\n";} when($foo eq 'foo' and $bar eq 'treck'){print "$foo is standard\n";} when($foo eq 'check' and $bar eq 'bar'){print "$bar is standard\n";} when($foo eq 'foo' and $bar eq 'bar' and $baz eq 'baz'){print "All are standard\n";} when($foo eq 'foo' and $bar eq 'bar'){print "both are standard\n";} } ####