Search notes:

Perl function: require

use warnings;
use strict;

our $r_foo;

require "required.pl";
#
#  it seems that alternatively it can be written
#     require required
#  but that then the required file needs the name
#     required.pm
#

printf "%s  %d\n", $r_foo, sum (38, 4);
Github repository about-perl, path: /functions/require/require.pl
our $r_foo = 'bar';

sub sum {

  my $arg_1 = shift;
  my $arg_2 = shift;

  return $arg_1 + $arg_2;

}

1;
Github repository about-perl, path: /functions/require/required.pl

See also

Perl functions

Index