#!/usr/bin/perl -w #test2.pl use strict; my $input = ''; my $error = "We received nothing!"; while (my $line = ) { $input .= $line; } if ($input ne '') { print "We received input:\n"; print $input; } else { print $error; } exit;