Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: escaped \n in regex

by pfaut (Priest)
on Feb 20, 2003 at 00:31 UTC ( [id://236916]=note: print w/replies, xml ) Need Help??


in reply to escaped \n in regex

Perl doesn't do things to be 'cool'. It does things to be useful. Besides, what 'cool' thing did you expect perl to do with that, anyway?

You embedded a literal newline in your regular expression. That matches newlines in the string you match against as you can see by your test code. Putting a backslash in front of it does nothing since it's not a special character.

--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://236916]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found