Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • It's not just about speed, though. It also matters how long it takes you to write the program and how maintainable and extensible it is.

    For speed I'm offering (untested, just jotted down quickly):

        #/usr/bin/perl -n
        for $e (qw/gif jpg css GIF JPG CSS/) {
            next if index($_, "$e HTTP") != -1
        }
        print, next if substr($_, 0, 4) eq '192.';
        next if substr($_, 4, 2) eq '9.';
        next if substr($_, 4, 3) eq '1
    • errr... this should be

      > next if index($_, "$e HTTP") != -1

          next LINE if index($_, "$e HTTP") != -1

      and

      > print, next if substr($_, 0, 4) eq '192.';

          print, next if substr($_, 0, 4) ne '192.';

      oh, for an edit interface... but you get the idea.

      marcel