Puts for old versions of Perl?

Software

Ruby developer complaining to me today that Perl doesn't have a puts method.

#!/usr/bin/env/perl -w
use strict;
my $goto = "K-K-K-K-Kathmandu!";
&puts("I think I'm going to…", $goto);
sub puts {
    print "@_n";
}

Problem solved! ^_^

Author bio and support

Me!

Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person in bios. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.