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