http://www.perlmonks.org?node_id=1017248


in reply to Re^2: Email Forwarding
in thread Email Forwarding

Then use one of the modules specified to read and parse the text going from STDIN. You can read from STDIN filehandle using diamond operator (<>), like this:  my $whole_message = do { local $/; <STDIN> }; (see also $/ for more information on slurping filehandle contents).
Sorry if my advice was wrong.