neutron has asked for the wisdom of the Perl Monks concerning the following question:
I've also tried just about every variation of this. With and without the "C:", lower case "c", "basename($name)" with brackets, without, ... you get the idea. In any scenario, it either crashes or returns back the original $name with some random characters missing.use File::Basename; my $name = "C:\karate\kid\sucks"; my $basename = basename($name); print "$basename\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple modules
by BrowserUk (Patriarch) on Jan 31, 2009 at 13:12 UTC | |
|
Re: Simple modules
by CountZero (Bishop) on Jan 31, 2009 at 16:24 UTC | |
|
Re: Simple modules
by locked_user sundialsvc4 (Abbot) on Jan 31, 2009 at 17:22 UTC | |
|
Re: Simple modules
by Anonymous Monk on Jan 31, 2009 at 14:22 UTC | |
|
Re: Simple modules
by neutron (Sexton) on Jan 31, 2009 at 14:03 UTC |