programming-examples/perl/Subroutine/Check the prototype.pl
2019-11-15 12:59:38 +01:00

12 lines
194 B
Perl

#!/usr/bin/perl
use strict;
use warnings;
sub add_two ($$) {
return $_[0]+$_[1];
}
print prototype(\&add_two),"\n"; # produces '$$'
print prototype('add_two'),"\n"; # likewise