[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] crunching the modules at @INC



From: Steve Willer <willer@interlog.com>
Date: Wed, 16 Jun 1999 12:34:00 -0400 (EDT)
>On Mon, 14 Jun 1999, Ronald J Kimball wrote:
>
> > >   (my $module = $File::Find::name) =~ s|/|::|go;
> >
> > Useless use of /o on constant regex.
>
>Is this the case? I don't see anything saying this in the man pages.
>
>Even if Perl happens to behave this way right now, perhaps it serves as 
>useful explicit documentation, like '' versus "".

??

I'm not sure I follow.  The /o option simply tells perl not to
recompile a regex that contains interpolation strings more than
once.

If you don't have something like s/$pattern/subst/o, what purpose does the 
/o serve?  Perl isn't going to compile your pattern more than once anyways, 
so why make the reader wonder?

If you want to insert useful explicit documentation, you could use the /x 
option and put comments in, but this substitution is too short to need that.
--
Mike


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org

</x-flowed>