Piers Cawley: # "Brent Dax" <[EMAIL PROTECTED]> writes: # > Larry Wall: # > That's...odd. Is $$ (the variable) going away? # > # > # /./s /<any>/ or /<.>/ ??? # > # > I think that . is too common a metacharacter to be # relegated to this. # # I think you failed to notice that '/s' on the regex. In # general . will still mean . but if you want it to match # *anything* including a new line, you have to call it <.>. # Personally, I don't have a problem with that.
Ah, you're right. My bad. # > # space <sp> (or \h for "horizontal"?) # > # > Same thinking as '.'. # # The golfers aren't going to like it for sure. But most of the # time when I'm doing production code I have /x turned on # anyway, and in that context, if I want to match a space and # only a space, I have to do [ ] anyway. # # It might be nice if we could have m:X// mean 'space and hash # match themselves'. I was thinking that <sp> would replace \s. If that isn't the case, I have no real complaint (if you can turn off /x). # > # \t also <tab> # > # \n also <lf> or <nl> (latter matching # > logical newline) # > # \r also <cr> # > # \f also <ff> # > # \a also <bell> # > # \e also <esc> # > # > I can tell you right now that these are going to screw people up. # > They'll try to use these in normal strings and be confused when it # > doesn't work. And you probably won't be able to emit a warning, # > considering how much CGI Perl munches. # # But assigning meaning to < and > is going to do that anyway. Not if the things are meaningless outside of regexes. For example, lookahead sequences make absolutely no sense in a quoted string. --Brent Dax <[EMAIL PROTECTED]> @roles=map {"Parrot $_"} qw(embedding regexen Configure) #define private public --Spotted in a C++ program just before a #include