From: Kevin Pfeiffer <[EMAIL PROTECTED]> > > my $test = "Rnott230602.txt"; > > if ( $test =~ m/^(.{1})(.{4})(.{6})\.(.{3})$/ ) { > > What is the difference between "if ( $test =~ m/...)" > and "if ( $test =~ /...)" (without the "m")? (If any?)
None. The "m" just allows you to use a different delimiter. These all mean the same: $test =~ /regexp/; $test =~ m/regexp/; $test =~ m(regexp); $test =~ m#regexp#; This is the same "issue" as with single quotes and q operator: $str = 'hello'; $str = q(hello); $str = q-hello-; doublequote and qq : $str = "hello"; $str = qq(hello); $str = qq-hello-; backtick and qx : $str = `dir`; $str = qx(dir); $str = qx-dir-; You can use any delimiter with s/// as well: $str =~ s/regexp/replacement/; $str =~ s(regexp)(replacement); $str =~ s(regexp)<replacement>; $str =~ s#regexp#replacement#; Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]