in reply to Re^2: Current working directory on win32
in thread Current working directory on win32
Ah! I think I see your nuance, although I would argue that it is of a somewhat academic character in this case. Isn't "Locates directory of original perl script" in this case similar to Cwd's "get pathname of current working directory"?
After all, the end results are (on my box) the same. TIMTOWDI, you know ;)
use FindBin; use Win32; use Cwd; my( $path, $filename ) = Win32::GetFullPathName( $0 ); my $longpath = Win32::GetFullPathName( $path ); print "FindBin: $FindBin::Bin\n"; print "Win32: $longpath\n"; print "Cwd: ", cwd(), "\n";
The result:
c:/dev/temp/monks $ perl wdir.pl FindBin: C:/dev/temp/monks Win32: c:\dev\temp\monks\ Cwd: c:/dev/temp/monks
Seems to me that FindBin and Cwd does more or less the same job here?
pernod
--
Mischief. Mayhem. Soap.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Current working directory on win32
by Limbic~Region (Chancellor) on Oct 14, 2004 at 13:58 UTC | |
|
Re^4: Current working directory on win32
by vjo (Novice) on Oct 15, 2004 at 17:08 UTC |