home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!gatech!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!uwm.edu!cs.utexas.edu!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: Problem with m//
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1993Jan22.135043.21623@news.eng.convex.com>
- Date: Fri, 22 Jan 1993 13:50:43 GMT
- Reply-To: tchrist@pixel.convex.COM (Tom Christiansen)
- References: <KHERA.93Jan20130300@thneed.cs.duke.edu>
- Nntp-Posting-Host: pixel.convex.com
- Organization: Convex Computer Corporation, Colorado Springs, CO
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 15
-
- If you're doing a pattern match but don't want and patterns, as in
-
- $p =~ s/(\W)/\\$1/g;
- $os =~ /$p/;
-
- Then perhaps it makes more sense to simply use index() instead:
-
- if (index($os, $p, >= $[) { }
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
-
- Perle, plesaunte to prynces paye/ To clanly clos in golde so clere,
- Oute of oryent, I hardyly saye/ Ne proued I neuer her precios pere.
-