Michael,

$a ~= mmnipm;

The first m is 'match' and is using the letter m as a delimiter.

equivalent to 

$a =~ /nip/;

or

$a =~ m(nip);

This is syntactically valid. Why should this give a warning?

Ivor.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 10:16
To: [EMAIL PROTECTED]
Subject: weird regexness


Why does:

#!/usr/local/bin/perl -w

use strict;
use warnings;

my $a = "wibble mmnipm";

if ($a =~ mmnipm) {
    print "match\n";
} else {
    print "no match\n";
}

do what it does, and give no warnings?

Michael


-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely 
for the intended addressee(s). Unauthorised reproduction, disclosure, 
modification, and/or distribution of this email may be unlawful. If you 
have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message 
do not necessarily reflect those of LIFFE (Holdings) Plc or any of its 
subsidiary companies.
-----------------------------------------------------------------------

Reply via email to