Hacker News new | ask | show | jobs
by higerordermap 1932 days ago
Perl's $_ is supposedly something inspired by linguistics.
1 comments

Indeed. It's called "the topic".

In the Raku Programming Language it is set with various explicit commands, such as `given` (just set it) or `with` (only fire if instantiated). Method calls without an invocant, are executed on the toppic. Together with phasers, this combines into:

    LEAVE .disconnect with $dbh;
In other words: if you leave this block of code (by any means, including an exception), disconnect the database handle if it was instantiated)