Help for this page
print "yes" if not tr/a-zA-Z,//c and not ( str( $_, ',', 0) or str $_, + ',' ,-1);
for (qw/ ,asd asd:asd asd, asd,asd asd,,asd/){ my $test = $_; ... print "yes" unless $test=~tr/a-zA-Z,//c or index( $test, ',') == 0 or + index( $test, ',') == -1 + length( $test) or index( $test, ',,') > 0 +; print "\n"; }