[Chicago-talk] Slurp

Andy_Bach at wiwb.uscourts.gov Andy_Bach at wiwb.uscourts.gov
Tue Dec 23 14:55:27 CST 2003


Don't slurp it all at once?  I mean read the header, line by line (until 
the first blank line) and then look for something like, I dunno 
attachments or size in the header and then slurp the rest.  vaguely:

my $okay = 0;
while (<>) {
   # blank line, end of header
   last if /^\s*$/;
  # process header lines
}

if ( $okay ) {
   $/ = ""
    $body = <>;
} else {
  # bad msg?
}

a

Andy Bach, Sys. Mangler
Internet: andy_bach at wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5030

Documentation is the castor oil of programming.  Managers know it must be 
good because the programmers hate it so much.



More information about the Chicago-talk mailing list