home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!gatech!europa.asd.contel.com!darwin.sura.net!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: In 5.0, are we gonna get...
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Dec14.161234.21332@news.eng.convex.com>
- Date: Mon, 14 Dec 1992 16:12:34 GMT
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- References: <1992Dec14.043835.23009@reed.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: 28
-
- From the keyboard of mjeffery@reed.edu (Mark Jefferys):
- :Will we see:
- :
- :1) an equivalent of lisp's mapcar? For an instance:
- :
- : map(/(\d+)/, "asdf 23fjk4", "qwerty", "123 ")
- :
- : would return ("23", "4", "123").
-
- Usually grep works like mapcar; you could this:
-
- grep (push(@retlist, /(\d+)/g), "asdf 23fjk4", "qwerty", "123 ")
-
- I'd like to use
-
- grep(/(\d+)/g, "asdf 23fjk4", "qwerty", "123 ")
-
- but that doesn't work for two reasons:
-
- 1) i haven't been able to tickle grep's expr into an array context
- 2) it returns the original elt, not the expr result
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
- You know, by the time you get some with all this, the "Swiss Army
- Chainsaw" is going to be more like a Swiss Army Tactical Nuke.... :-)
- --Brandon Allbery on perl in <1991Feb21.002412.20045@NCoast.ORG>
-