[Israel.pm] A Matching Inputted Regexps Catch

Shlomi Fish shlomif at iglu.org.il
Thu Nov 11 23:09:33 PST 2004


On Thursday 11 November 2004 15:01, Mikhael Goikhman wrote:
> On 11 Nov 2004 13:12:29 +0200, Shlomi Fish wrote:
> > my $regex = "";
> > if ($path =~ /$regex/)
>
> I once got into this problem too.
>
> I think this is a horrible misfeature of perl. It would be much wiser to
> only trigger this empty regexp "feature" on syntactically empty regexp,
> i.e. //. Or disable it completely.

Yes, I agree - it is a misfeature and it confused the hell out of me.

Regards,

	Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

Knuth is not God! It took him two days to build the Roman Empire.



More information about the Perl mailing list