if ( $function eq 'load' ) {
# this
}
elsif ( $function eq 'mark' ) {
# that
}
elsif ( $function eq 'foobar' ) {
# something completely different
}
else {
# any other stuff or something unexpected?
}
####
my $junk;
($junk,my $headsent,my $headword) = split(/[sw]/,$h);
##
##
# no $junk anymore and no doubled 'my' !
my ( $headsent, $headword ) = ( split /[sw]/, $h )[1,2];