Marty Pauley ([EMAIL PROTECTED]) wrote: > On Tue Oct 8 17:49:33 2002, Simon Wistow wrote: > > Ditto removing the preceding path from $0 for a usage function > > > > ( my $name = $0 ) =~ s!^.*[\\/]!!; > > I prefer: > > use File::Basename; > ... > my $name = basename $0; > > since it handles :foo:bar:baz and foo:[bar]baz as full paths. > > Prewritten modules are better than patterns.
Why not use FindBin '$Script'; ?