Skip to content

Instantly share code, notes, and snippets.

@ruslanbes
Created December 25, 2021 12:30
Show Gist options
  • Save ruslanbes/fbb8ca0f2b9819b89d47e00c4f3f4c7a to your computer and use it in GitHub Desktop.
Save ruslanbes/fbb8ca0f2b9819b89d47e00c4f3f4c7a to your computer and use it in GitHub Desktop.
Two lines of code that parse two lines of embedded comments in the code to read the Mayan numbers representing the individual ASCII characters that make up the magazine title, rendered in 90-degree rotated ASCII art.
#:: ::-| ::-| .-. :||-:: 0-| .-| ::||-| .:|-. :||
open(Q,$0);while("){if(/^#(.*)$/){for(split('-',$1)){$q=0;for(split){s/|
/:.:/xg;s/:/../g;$Q=$_?length:$_;$q+=$q?$Q:$Q*20;}print chr($q);}}}print"n";
#.: ::||-| .||-| :|||-| ::||-| ||-:: :|||-| .:|
"
@yuri-sq
Copy link

yuri-sq commented Nov 22, 2023

There is an error, must be while(<Q>), and no quote in the end

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