Help for this page
use lib 'path/to/the/modules'; # The example module could be path/to/the/modules/NameOfTheProject/Som +eModule.pm
use strict; package NameOfTheProject::SomeModule; ... } 1;
use NameOfTheProject::SomeModule; print NameOfTheProject::SomeModule::some_function(); # prints 123
use base 'Exporter'; our @EXPORT_OK = ('some_function');
use NameOfTheProject::SomeModule ('some_function'); print some_function(); # prints 123
# This is config.pl mirror => 'http://www.nl.example.com/mirror', path => '/var/www/example', skip_files => [ 'png', 'gif', 'jpg' ],
# This is script.pl use strict; ... chdir $config{path}; ...
use strict; package Acme::Include; ... } 1;
# This is foo.pl use strict; ... include 'bar.pl'; print $lexical; # Should print: set in bar.pl
# This is bar.pl use strict; ... # There is no "my" here, because that would create a *new* lexical # variable, hiding the existing one.
www.com | www.net | www.org
No recent polls found