I want to write a perl script like "gnu less".
My perl script accepts input on STDIN or filename(s) as arguments.
If both are missing it should print the error message. How do I do this
?
The pseudocode will be
----------
IF INPUT ON STDIN ;then
Process STDIN
ELSE IF ARGUMENT(S) is a file ;then
Process content of file(s)
ELSE
Show usage / help message
END IF
------------
Any ideas how this can be done in perl ?
Thanks
Ram
----------------------------------------------------------
Netcore Solutions Pvt. Ltd.
Website: http://www.netcore.co.in
Spamtraps: http://cleanmail.netcore.co.in/directory.html
----------------------------------------------------------
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>