perl -w foo.pl %1 %2 %3 #### #!/usr/bin/perl -w # sub foo { my ( $var1, $var2, $var3 ) = @_; # More code follows, using the passed parameters. }