Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Open txt file using default program on Windows

by ikegami (Pope)
on Jun 02, 2013 at 19:19 UTC ( #1036614=note: print w/replies, xml ) Need Help??

in reply to Open txt file using default program on Windows

Why didn't you show the command that fails? You're leaving us guessing.

You might have stumbled into a problem resulting from start's weird syntax which can be addressed as follows:

my $doc = ...; system(qq{start "" "$doc"});

Replies are listed 'Best First'.
Re^2: Open txt file using default program on Windows
by tanyeun (Sexton) on Jun 03, 2013 at 18:36 UTC
    Thanks guys for the reply

    When I am debugging programs at work, I need to do the following very often:
    1. cat the kernel log
    2. save it to a file
    3. open file and search for possible failures

    So I wrote this small program to do the above 3 steps with one button click via TK
    I put this program in a network drive in the lab where IT set it up that can be accessed by everybody on their own machines.

    I can't really show the error message here because I can't reproduce it on my machines or any of the machines in my lab.
    As I remembered that I couldn't open the text file on others' machine and windows popped out warning message.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036614]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2017-10-23 23:34 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (285 votes). Check out past polls.