in reply to Is it possible to open notepad?

Frankly, I'd discourage you from doing whatever it is you're trying to do with Perl and Microsoft Notepad. Control an inferior text editor from a superior text processing scripting language? Sounds kind of klunky.

Tell us what your real problem is and I'll bet someone can suggest a better approach to solving it than by using Perl to control Microsoft Notepad.

(I acknowledge I could be profoundly wrong and that the Perl/Notepad duo might be the perfect software pairing for your problem domain. But you've piqued my curiousity and I'd love to learn more—and to help if I can.)

Replies are listed 'Best First'.
Re^2: Is it possible to open notepad?
by chromatic (Archbishop) on Aug 25, 2011 at 01:33 UTC
    Control an inferior text editor from a superior text processing scripting language?

    I use this technique occasionally in CLI programs which require entering a fair amount of text: I generate a YAML or JSON file which prompts for the desired input, write it to a temporary file, then launch $ENV{EDITOR} || '/usr/bin/vi' to edit the file.

    It works well for programs where I can assume users have the appropriate technical skills.

      Fair enough. I can see a use case for popping open a text editor in the middle of CLI program.

      It works well for programs where I can assume users have the appropriate technical skills.

      In the Windows world, one can assume that users with "appropriate technical skills" will refuse to use Microsoft Notepad. ;-)