home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!uwm.edu!ogicse!reed!mjeffery
- From: mjeffery@reed.edu (Mark Jefferys)
- Newsgroups: comp.lang.perl
- Subject: In 5.0, are we gonna get...
- Message-ID: <1992Dec14.043835.23009@reed.edu>
- Date: 14 Dec 92 04:38:35 GMT
- Organization: Reed College, Portland, OR
- Lines: 31
-
- Will we see:
-
- 1) an equivalent of lisp's mapcar? For an instance:
-
- map(/(\d+)/, "asdf 23fjk4", "qwerty", "123 ")
-
- would return ("23", "4", "123").
-
-
- 2) a way of only matching the real beginning/end of a *string* in a
- regexp? Currently, '^' and '$' match the beginning and ending of
- a line (with simplifying assumptions when $* == 0). A string match
- would ignore newlines and $*.
-
- A new option on pattern matches might do it: `/^\d+$/s' might match
- "23", but not "23\n" or "x\n45". The option should treat `.' as
- matching "\n", as well as every other character -- so the option
- means that "\n" should not be treated specially.
-
-
- 3) a pure grouping operator in pattern matches. Normally, `/Type:
- (\d+|[a-zA-Z])/' will return an element containing the
- `\d+|[a-zA-Z]' (in an array context), and assign $1 to the pattern.
- If this isn't wanted, it will only slow perl down, and possibly
- make life confusing if the pattern is very complex. One that
- doesn't try to save its contents would be nice.
-
-
- Mark
- --
- Mark Jefferys Internet: mjeffery@reed.edu
-