in reply to Re: Useful Uses of regex code expressions?in thread Useful Uses of regex code expressions?
foreach my $char (a..d) { print "bbb matches $char\n" if "bbb" =~ /[$char]/; } [download]
bbb matches b [download]