Last active
March 29, 2023 07:27
-
-
Save OEUG99/2647909cfdc8e3d7a934dceb8c4c19f2 to your computer and use it in GitHub Desktop.
Cat CLI written in perl, but as one line of code.
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
#perl program simialr to cat, get input from user via Standar Input, and then print. | |
print foreach eval qw(<STDIN>); exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the qw is the magic of it all. We read from standard input, but then we immediately sanitize it!