in reply to Opening a text file in its native application
Start does not like spaces in the dir names (even if you quote them). Here is one way -
use strict; use warnings; use File::Basename; my @args = ("start/d", "c:/program files/T.txt"); my $file = pop(@args); push (@args, '"'. dirname($file) . '"', basename($file)); system(@args) == 0 or die $@;
(This will not work for filenames with spaces, not sure if start can handle it anyways).
-SK
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Opening a text file in its native application
by FM (Acolyte) on Jan 16, 2006 at 07:03 UTC |
In Section
Seekers of Perl Wisdom