The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

How do you use regular expressions? by mikosullivan2006-11-19 12:55:59
  I tend to write deeply evil perl. by Yohimbe 2002-06-05 13:30:55
Here's part of the function of netstat -ta in 273 bytes of perl. Linux only.
#!/usr/bin/perl
use strict;
open (PROC,"/proc/net/tcp");
while (<PROC>) {
        s/([0-9A-F]{8})/xlateaddr($1)/eg;
        s/:([0-9A-F]{4})/":" . xlatehex($1)/eg;
        print;
}
sub xlateaddr { join ".", map hex , reverse shift =~ m/[0-9A-F]{2}/g;}
sub xlatehex { sprintf "%d", hex shift; }
[ Reply ]
    I'm proud of this one. by Yohimbe2002-06-05 13:33:22
      Hmm, now and *that's* by IByte2002-06-05 13:38:15
        Same here by DaNutBall2002-06-05 13:40:48
          You wanna see deeply ill? by Yohimbe2002-06-05 13:48:29
            *vomit* by DaNutBall2002-06-05 13:57:38
              Don't you vomit all over the ARS source! by bugarup2002-06-05 14:43:33
                Yikes! There's bits all over the place!!! (n/t) by Tars_Tarkas2002-06-05 14:52:14
                  *grin* for obfusticated coding, that's what... by DaNutBall2002-06-05 15:16:27
            I'm sure some of the other moderators by Naruki2002-06-05 16:02:06
              That would almost be as bad as modding Illiad by nawft2002-06-05 17:04:34
                It'd probably be worse. by Naruki2002-06-05 19:14:41
          that must be why by nimdokk2002-06-05 14:47:50
        Come on, it's possible to write legible Perl too by SMcV2006-11-19 12:55:59

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)