how to test for existance of STDIN in perl
if ( -t STDIN ) {
print "no input piped\n";
} else {
print "input piped:\n";
while (<>) {
print;
}
}
print "no input piped\n";
} else {
print "input piped:\n";
while (<>) {
print;
}
}
notebook I carry from job to job
0 Comments:
Post a Comment
<< Home