Perl is mostly case-sensitive. There is some ambiguity over case with regard to module names on case-insensitive file systems. For example, given the following module:
# this code is in Foo/Bar.pm package Foo::Bar; use parent qw/Exporter/; our @EXPORT = qw/baz/; sub baz { "Hello world"; } 1;
On a Windows system (Windows a uses case-insensitive but case-preserving file system) you could do this:
use 5.010; use strict; use foo::bar; say Foo::Bar::baz(); # says "Hello world"
And you could do this:
use 5.010; use strict; use Foo::Bar; say baz(); # says "Hello world"
But you couldn't do this:
use 5.010; use strict; use foo::bar; say baz(); # dies - undefined subroutine main::baz
And you couldn't do this:
use 5.010; use strict; use foo::bar; say foo::bar::baz(); # dies - undefined subroutine again
In reply to Re^3: Undefined Subroutine & Global symbol requires explicit package name
by tobyink
in thread Undefined Subroutine & Global symbol requires explicit package name
by jaldama
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |