Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

HI, I want to know whether we can use Perl script to open putty window instead of opening it directly(we need to call the script using browser) Any suggestions for this please share with me. Thanks

Replies are listed 'Best First'.
Re: Can we open putty using perl code
by Corion (Patriarch) on Sep 12, 2014 at 06:18 UTC
Re: Can we open putty using perl code
by ww (Archbishop) on Sep 12, 2014 at 11:45 UTC

    Please stop posting and reposting what amounts to a single question. You have many answers. Learn from them.

    If you're truly interested in learning Perl (which is what this site is about; emphasis on learning, please register and get a handle to distinguish youself from other Anonymonks (good, bad and indifferent), trolls, and leeches.

    And, not just BTW, please read On asking for help, How do I post a question effectively?, I know what I mean. Why don't you? and (because you'll need it when you start posting questions about the code you're trying to write) Markup in the Monastery. Those are generally short, sweet and to-the-point.


    ++$anecdote ne $data


Re: Can we open putty using perl code
by Anonymous Monk on Sep 12, 2014 at 06:18 UTC
    Perl script can only do what other programs allow, so ... it depends on what other programs allow (like your browser)
Re: Can we open putty using perl code
by Old_Gray_Bear (Bishop) on Sep 12, 2014 at 17:54 UTC
    Yes we can.

    But, unless there is an API for puTTY, it buys you nothing over using the command line.

    Now, the X question -- "Why do you want to do this?"

    Both vi and putty are not designed to be used as part of a Unix Tool pipeline (at least not easily). They are standalone tools, and bundling them into your application is not a trivial exercise. It sounds to me like a way to give your application user access to tools that have the potential to cause Major Drechlikeit. Have you talked this over in depth with your system and security admins? Do it today.

    Handing a running chainsaw to Joe-Random-User-from-off-the-Web is a recipe for a lot of Grief and Pain. Don't do it.

    ----
    I Go Back to Sleep, Now.

    OGB