Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 ( #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
Node Status?
node history
Node Type: note [id://266769]
help
Chatterbox?
[james28909]: thanks
[james28909]: what i am trying to do is track state of a chat based application. i need to be able to store the channels and such for a user, and when they join a new server/channel i need to be able to update that feild.
[james28909]: do you think OO would best suite that?
[karlgoethebier]: james28909: The last two are not mainstream. You have been warned ;-)
[karlgoethebier]: james28909: I don't know. Try it.
[james28909]: foreach server this bot is on, the gateway sends me a json response, which i parse out all the info with JSON, and this response has user information, i need to be able to add a user, and then update the user info when they join/leave rooms ect

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-05-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?