Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Opening a text file in its native application

by sk (Curate)
on Jan 16, 2006 at 06:44 UTC ( #523414=note: print w/replies, xml ) Need Help??


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

    Hi SK,

    This is wonderful! It works!

    Thank you so much!

    Claire

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://523414]
help
Chatterbox?
[1nickt]: choroba I'm trying to make a cpanfile for pm-cb ... how to handle the MCE vs Thread::Queue question? Maybe with on 'build' => sub { if ($threaded_perl) { requires 'Thread::Queue' } else { requires 'MCE' } ?

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2017-10-18 13:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (244 votes). Check out past polls.

    Notices?