if ( $opt_e ) { # Preprocess STDIN and strip email header $start_of_body=0; while ( !($start_of_body) ){ $line=; if($line eq "\n") { $start_of_body=1; } } $twig->parse( \*STDIN); } else { print "Reading from STDIN, press CTRL+D when finished.\n"; $twig->parse( \*STDIN); } }