Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Can this be a 1 line or simpler regex?

by Abigail-II (Bishop)
on Apr 05, 2003 at 07:30 UTC ( [id://248269]=note: print w/replies, xml ) Need Help??


in reply to Can this be a 1 line or simpler regex?

I think the above is fine, but if you insist on less lines:
%& = ("\t" => '\t', "\n" => '\n', "\r" => '\r', "\f" => '\f'); s/[\t\n\r\f]/$&{$&}/g;

I wouldn't call it simpler though.

Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-22 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found