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.
In reply to Re^3: Current working directory on win32
by pernod
in thread Current working directory on win32
by kamesh3183
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |