$flag=0; open(OUT,">$ARGV[0]") || die "Can't open conduit: $!"; while() { $l=$_; chomp; $flag++ if(/^$/); # Header/Body seperation $header[$hi++]=$_ unless($flag); $body[$bi++]=$_ if($flag); }