I deleted the original message by mistake, but here's your answer: you
want to use the -t file test.
if (@ARGV) {
# getting input via command-line arg
$html = shift;
}
elsif (-t STDIN) {
# STDIN is the user's terminal (as opposed to a piped stream)
usage();
}
else {
# the user has piped us something
$html = join "", <STDIN>;
}
See 'perldoc -f -X' for more details.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]