perl 输入
#!/usr/bin/perl
$line = <STDIN>;
if ($line eq "\n") {
print "that was just a blank line!\n";
} else {
print "that line of input was :$line";
$line = <STDIN>;
if ($line eq "\n") {
print "that was just a blank line!\n";
} else {
print "that line of input was :$line";
}
#!/usr/bin/perl
$madonna = <STDIN>;
if (defined ($madonna))
{
print "the input was $madonna";
}
else
{
print "no input available!\n";
}