#!perl -lw use strict; use CGI (); use CGI::Capture (); print "What is your name?"; sleep 5; SCOPE: { my $input = ; chomp $input; my $input_ref = \$input; if ( CGI::Capture->_stdin($input_ref) ) { print "Hello, $input" or die $!; } }