-
-
Save bxt/4942321 to your computer and use it in GitHub Desktop.
Some really weird ruby script showing some awkish/sedish features
This file contains hidden or 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
$/=%q(/) | |
$\=%Q(\t) | |
while DATA.gets | |
BEGIN {puts "START #{$0}"} | |
END {puts "DONE."} | |
puts $_[/a(.{2})/,1] || '--' | |
end | |
__END__ | |
alal2/gg/omglol/la/abcd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So apparently in recent rubies
BEGIN
andEND
are a little more sane, this script now throws an error: