in reply to Dissecting a complete pathname to a file
Note: Written but not run past a Perl interpreter....use strict; use warnings; use File::Basename; use Cwd; my $file_name = './hello.world'; # Insert your file-name gathering logic here # Place the results in $file_name. my ($base_name, $path, $suffix) = fileparse($file_name); if ($path =~ /\./) { $path = cwd(); }
----
I Go Back to Sleep, Now.
OGB
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dissecting a complete pathname to a file
by ikegami (Patriarch) on Feb 27, 2007 at 23:37 UTC |