my $long = 'D:/temp/spa ce/ab cd.txt'; my $short = Win32::GetShortPathName($long); system('start', $short);
This will also avoid the problem that spaces in the actual filename cannot be handled/escaped in the start call.
It's not necessary to issue a use Win32;, since GetShortPathName is accessible as core function in AS perl on Win.
In reply to Re: Opening a text file in its native application
by pKai
in thread Opening a text file in its native application
by FM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |