Created
December 31, 2013 05:52
-
-
Save jberger/8193149 to your computer and use it in GitHub Desktop.
The perils of & (and prototypes too!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
$"=' and '; # this is just showing off :-) | |
sub mysub ($) { print "@_\n" } | |
sub main { | |
&mysub(@_); | |
mysub(@_); | |
&mysub; | |
my $greeting = shift; | |
&mysub($greeting); | |
mysub($greeting); | |
&mysub; | |
} | |
main('hello world', 'good bye!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment