programming-examples/perl/Subroutine/my ($program, $exitCode) = @_; creates two local variables, $program and $exitCode, from @_.pl
2019-11-15 12:59:38 +01:00

12 lines
233 B
Perl

#!/usr/local/bin/perl -w
# Declare the subroutine named usage
sub usage
{
my ($program, $exitCode) = @_;
print "Usage: $program [-v] [-h]\n";
exit $exitCode;
}
usage ($0, 1);