Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: I wrote some clever code - can the comment "defuse" it? (final form)

by Aristotle (Chancellor)
on Jun 18, 2003 at 09:57 UTC ( [id://266769]=note: print w/replies, xml ) Need Help??


in reply to Re: I wrote some clever code - can the comment "defuse" it? (stab at restructuring)
in thread I wrote some clever code - can the comment "defuse" it?

It just dawned on me that I can follow MarkM's advice from the chatterbox more directly than I thought. My %property is completely redundant considering I have %enc which maps from PS names to Unicode characters.
my @sequence_length = map { length } join('', @enc{@letter}) =~ / \G( \p{Letter}+ | \p{DecimalNumber}+ | [\P{Letter}\P{DecimalNumber}] ) /gx;
This is, IMO, hugely more self documenting than what I had before.

Makeshifts last the longest.

  • Comment on Re^2: I wrote some clever code - can the comment "defuse" it? (final form)
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-25 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found