Skip to content

Instantly share code, notes, and snippets.

@alecchen
Created September 21, 2012 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alecchen/3759980 to your computer and use it in GitHub Desktop.
Save alecchen/3759980 to your computer and use it in GitHub Desktop.
foo('bar', 100)
sub foo {
# $first = 'bar'
my $first = shift;
my $first = shift @_;
my $first = $_[0];
my ($first) = @_;
# $first = 'bar', $second = 100;
my $first = shift;
my $second = shift;
my $first = $_[0];
my $second = $_[1];
my ($first, $second) = @_;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment