Skip to content

Instantly share code, notes, and snippets.

@andrewsolomon
Created May 21, 2017 17:08
Show Gist options
  • Save andrewsolomon/876a12f5e605fcca4eaef0d0ef84905b to your computer and use it in GitHub Desktop.
Save andrewsolomon/876a12f5e605fcca4eaef0d0ef84905b to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
sub join_args {
return $_[0] . ' ' .$_[1];
}
say 'Calling with variables as arguments';
my $x = "foo"; my $y = "bar";
say "x is $x";
say join_args($x, $y);
say "x is now $x";
say 'Calling with scalars as arguments';
say join_args("this", "that");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment