Finding 'path to perl' of remote server

Discussion in 'Perl Misc' started by Randal L. Schwartz, Aug 15, 2003.

  1. >>>>> "Rafael" == Rafael Garcia-Suarez <> writes:

    Rafael> Perhaps a solution to your problem is to put

    Rafael> #!/usr/bin/env perl

    Rafael> at the 1st line of your perl programs (if you have env(1)). See the
    Rafael> perlrun manpage.

    Except that env(1) isn't portable, and on a few systems, they put
    it into /usr/ucb (or was it /bin?) instead of /usr/bin!

    Gah.

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
     
    Randal L. Schwartz, Aug 15, 2003
    #1
    1. Advertising

  2. Hello Group,

    I was wondering if it's possible to find the 'path to perl' on a
    remote server.

    This is what I want. I want to install a CGI script automatically on a
    remote webserver using FTP. For this I am going to use the perl module
    Net::FTP. After reading the manual of this module I found that almost
    everything about installing a CGI script can be automated [Create
    directory, put a cgi file, chmod it], but how to get the 'path to
    perl' of that remote server? If there is some way to get it then I can
    add that as the first line of the cgi file, and thus can achieve my
    goal of 'automatic remote CGI/Perl script installation'.

    Actually I never checked if all other parts[mkdir, cp, chmod] is
    practically possible using this module, because there is no meaning in
    doing those unless I can find some way to find the 'path to perl'.

    So is 'finding path to perl on remote server' something really
    possible? Or is this just a "DREAM"?

    Thanking you all in advance

    Regards
    Vijoy Varghese
     
    Vijoy Varghese, Aug 15, 2003
    #2
    1. Advertising

  3. Vijoy Varghese wrote in comp.lang.perl.misc :
    > I was wondering if it's possible to find the 'path to perl' on a
    > remote server.


    Perhaps a solution to your problem is to put

    #!/usr/bin/env perl

    at the 1st line of your perl programs (if you have env(1)). See the
    perlrun manpage.

    --
    Unicycle is not *NIX
     
    Rafael Garcia-Suarez, Aug 15, 2003
    #3
  4. > Except that env(1) isn't portable, and on a few systems, they put
    > it into /usr/ucb (or was it /bin?) instead of /usr/bin!


    So you guys mean to say that there is no 'reliable' solution to my problem :-?

    Vijoy~
     
    Vijoy Varghese, Aug 17, 2003
    #4
  5. Vijoy Varghese wrote in comp.lang.perl.misc :
    >> Except that env(1) isn't portable, and on a few systems, they put
    >> it into /usr/ucb (or was it /bin?) instead of /usr/bin!

    >
    > So you guys mean to say that there is no 'reliable' solution to my problem :-?


    This is a UNIX-dialect problem. That means that there's no universal, fully
    portable solution...

    (you can also check perlrun for that weird solution that involves eval
    and exec.)

    --
    Urinates is not *NIX
     
    Rafael Garcia-Suarez, Aug 17, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AL
    Replies:
    0
    Views:
    688
  2. Replies:
    1
    Views:
    590
    Oliver Wong
    Jul 13, 2006
  3. ll
    Replies:
    3
    Views:
    989
  4. Paul
    Replies:
    5
    Views:
    199
    Kyle Peterson
    Mar 20, 2006
  5. R. Sherwin Kartick

    embedded perl path $ENV{PATH} problem

    R. Sherwin Kartick, Sep 22, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    188
    R. Sherwin Kartick
    Sep 22, 2004
Loading...

Share This Page