Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on AWK-ward Ruby. Parent comment
Along with BEGIN & END there is also UNITCHECK, CHECK & INIT in Perl: http://perldoc.perl.org/perlmod.html#BEGIN%2c-UNITCHECK%2c-C...
These named blocks are used under the hood in Perl all the time. For eg.
foo(); # => bar sub foo { say "bar" }
BEGIN { *foo = sub { say "bar" } }
PS. Perl6 goes even further and calls them Phasers: http://feather.perl6.nl/syn/S04.html#Phasers
There are no comments on this comment yet.
Along with BEGIN & END there is also UNITCHECK, CHECK & INIT in Perl: http://perldoc.perl.org/perlmod.html#BEGIN%2c-UNITCHECK%2c-C...
These named blocks are used under the hood in Perl all the time. For eg.
The above works because the last line is interpreted as: And so is compiled before the foo() line is reached/run.PS. Perl6 goes even further and calls them Phasers: http://feather.perl6.nl/syn/S04.html#Phasers