Last active
January 10, 2018 10:26
-
-
Save DavidSzczesniak/b8c83d11c63b4636bf9204c1eb633a8a to your computer and use it in GitHub Desktop.
These can be named anything you want for the most part; using letters, digits and under-scores (can't start with digit). However, there are some common ones that Perl has created. These are STDIN, STDOUT, STDERR, DATA, ARGV, ARGVOUT. This will detail the main three though.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\!h STDIN & STDOUT - the barebones | |
STDIN - your program should blindy read from this (input). | |
STDOUT - and blindly write to this (output). | |
$ ./your_program <dino >wilma # shell prompt command | |
The program's input should be read from the file 'dino' amd the output should go to the file 'wilma' | |
\!h STDERR | |
This can be used to redirect any errors to wherever the user desires, though by default they go to that user's display screen. | |
Sending the errors to a file with a shell command: | |
$ netstat | ./your_program 2>/tmp/my_errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment