in reply to Different meanings of $0 under the same operating system
Typical use of $0:
use Cwd qw( realpath ); use File::Basename qw( dirname basename ); # Look for modules relative to script location use lib dirname(realpath($0)); sub usage { my $prog = basename($0); print STDERR "usage: $prog [options] [--] [files]\n"; exit(1); }
|
|---|