遲レス。
>>64,>>72
my @data = sort { $a <=> $b } keys %hash ;
( join ',', @data ) =~ /(¥d+),(?!(??{$1 + 1}))/;
print $1 + 1 , "¥n" ;
# sort は使わざるを得ない。

>>81
if ( $str =~ /a/ and $str =~/b/ and $str =~/c/ ) { print 'true' . "¥n" ; }