From: "Gazi, Nasser (London)" <[EMAIL PROTECTED]> > How can I find the name the perl script on Win32? > > I know that the usual way is to use $0 > > However, this gives me a problem on Win32 with filenames bigger than 8 > characters, where $0 returns filename filename like "FIILEMAME~" which > is useless to me.
perldoc Win32 Win32::GetLongPathName(PATHNAME) [CORE] Returns a representation of PATHNAME composed of longname components (if any). The result may not necessarily be longer than PATHNAME. No attempt is made to convert PATHNAME to the absolute path. Compare with Win32::GetShortPathName and Win32::GetFullPathName. This function has been added for Perl 5.6. So $path = Win32::GetLongPathName($0); should work. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]