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 #### perl -e "my $str='@bar'; if ($str =~ /^@/){ print \"No need to escape the \@ in a regex\";}" No need to escape the @ in a regex