perl -e "my $str='foo@bar'; if ($str =~ /@/){ print \"No need to escape the \@ in a regex\";}" No need to escape the @ in a regex