nysus has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone tell me why the "@" is escaped? The code prompted me to run this little test:...unless $cnf{from} && $cnf{from} =~ m/\@/;
The above code prints 'yes' with and without the backslash. So what exactly is that backslash doing?my $string = 'one@two.com'; if( $string =~ m/\@/ ) { print 'yes'; }
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Backslashed "@" in reg exes
by Tanktalus (Canon) on Nov 13, 2005 at 03:36 UTC | |
|
Re: Backslashed "@" in reg exes
by Zaxo (Archbishop) on Nov 13, 2005 at 04:36 UTC | |
|
Re: Backslashed "@" in reg exes
by pg (Canon) on Nov 13, 2005 at 03:59 UTC |