Skip to content

Instantly share code, notes, and snippets.

@OEUG99
Last active March 29, 2023 07:27
Show Gist options
  • Save OEUG99/2647909cfdc8e3d7a934dceb8c4c19f2 to your computer and use it in GitHub Desktop.
Save OEUG99/2647909cfdc8e3d7a934dceb8c4c19f2 to your computer and use it in GitHub Desktop.
Cat CLI written in perl, but as one line of code.
#perl program simialr to cat, get input from user via Standar Input, and then print.
print foreach eval qw(<STDIN>); exit 0;
@OEUG99
Copy link
Author

OEUG99 commented Mar 29, 2023

the qw is the magic of it all. We read from standard input, but then we immediately sanitize it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment