#! /usr/bin/perl -w use strict; use SubSwitch qw(switch case); switch ("foo", sub { case ("bar", sub { print "not here\n"; }); case ("foo", sub { print "here\n"; switch ("bar", sub { case ("bar", sub { print "there\n"; }); }); }); case ("bar", sub { print "still not here\n"; }); })