Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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"});


Comment on Re: Open txt file using default program on Windows
Select or Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036614]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-09-20 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (158 votes), past polls