Try to fix the warnings first. Change:
to:until (my $motif =~ /^\s*$/ );# Line 58
until ($motif =~ /^\s*$/ );# Line 58
Other advice:
In Section
Seekers of Perl Wisdom