Help for this page
if($mystring){ dosumpton(split(/\./, $mystring)); } elsif (not defined $mystring){ ... } else { # Something went wrong and we should be notified about it }
my @args = split /\./, $mystring; pop @args while (@args and !$args[-1]); dosumpton(@args);