Puts for old versions of Perl?

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! ^_^


Imprint

This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at weblog2017@rubenschade.com. Thanks :).