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).