找出以abc为前缀、中缀、后缀的词

xiaoxiao2021-02-28  86

open(In,"dict.txt"); while(<In>){ chomp; if(/(.+)=>(.+)/){ $Hash{$1}=$2; } } close(In); foreach $m(sort keys %Hash){ if($m=~/^ab/g){ print "$m\t$Hash{$m}\n"; } if($m=~/d$/){ print "$m\t$Hash{$m}\n"; } if($m=~/^[^a].*abc.*[^a]$/){ print "$m\t$Hash{$m}\n" } }
转载请注明原文地址: https://www.6miu.com/read-84394.html

最新回复(0)