#!/usr/bin/perl -l # foo.pl print "Hello world. Should I continue? (y/n)"; my $answer = ; print "Ok, you said $answer"; #### #!/usr/bin/perl open my $foo, "yes | ./foo.pl |" or die $!; while (<$foo>) { print ": $_"; } #### $ ./876596.pl : Hello world. Should I continue? (y/n) : Ok, you said y :