Michael Simmons wrote:
>
> Does anyone see what the problem with this is?
>
> if ( $tline[$i] =~ /^$name\s/ ) {
> if ( $tline[$i] =~ /\scname\s/ ) {
> print "Found the following alias: \n";
> print "$tline[$i];
> }
> elsif ( $tline[$i] =~ /\sa\s/ ) {
> print "Found the following address: \n";
> print "$tline[$i];
> }
> elsif ( $tline[$i] =~ /\smx\s/ ) {
> print "Found the following mail: \n";
> print $tline[$i];
> }
> }
>
> Getting this error...
>
> Unrecognized escape \s passed through at ./test line 39.
> Unrecognized escape \s passed through at ./test line 39.
perldoc perldiag
[snip]
/%s/: Unrecognized escape \\%c passed through
(W regexp) You used a backslash-character combination
which is not recognized by Perl. This combination
appears in an interpolated variable or a `''-delimited
regular expression. The character was understood lit�
erally.
There is probably some character in the variable $name that is causing
this. Try this instead:
if ( $tline[$i] =~ /^\Q$name\E\s/ ) {
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]