in reply to Re^2: how to open a separate notepad
in thread how to open a separate notepad

I think you mean "fork" and then "exec" in the new child process.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^4: how to open a separate notepad
by inman (Curate) on Jul 22, 2005 at 11:40 UTC
    You are entirely correct. I was testing with a one-liner (perl -e "exec('test.txt')") which doesn't point out that you never reach the line following the exec (because there isn't one!). Unfortunately, system by itself doesn't help because the Perl script is left waiting for notepad (or your favourite editor) to return.

    thundergnat provides the answer by modifying the command line to use the windows start command. This appears to be equivalent to the UNIX trailing apostrophe.

    print "This happens before\n"; system ("start test.txt"); print "This happens afterwards\n";