- or download this
package General;
use AutoLoader qw(AUTOLOAD);
...
func1 func2 ...
);
1;
- or download this
#!/usr/bin/perl
# file prog1.pl
...
; # ... more perl code
# end main
- or download this
#!/usr/bin/perl
# file func1.al
...
func1(@ARGV);
}
1; # <-- important!
- or download this
package General;
# optionally put your subs here to predeclare them at package loading
sub func1 ;
1; # last line, important
- or download this
#!/usr/bin/perl
use General qw(func1 otherfunc); # functions from General you want to
+call directly
my $result = func1($arg_a, $arg_b);