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

How do you find out what version of perl a server is running? Is there a comparison list somewhere so that I don't use something that is not supported in older versions?
  • Comment on what version of perl the server is running?

Replies are listed 'Best First'.
(crazyinsomniac) Re: what version of perl the server is running?
by crazyinsomniac (Prior) on Aug 18, 2001 at 04:14 UTC
    You should really have telnet access, but if you don't, it's not that hard to execute perl -v and pipe the output via a cgi script, like:
    #!/usr/bin/perl -w print "Content-Type: text/plain\n\n"; print `perl -v`;

     
    ___crazyinsomniac_______________________________________
    Disclaimer: Don't blame. It came from inside the void

    perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Re: what version of perl the server is running?
by Trimbach (Curate) on Aug 18, 2001 at 03:12 UTC
    If you have telnet access typing "perl -v" will work. If you don't, send an email to the server's Powers That Be.

    In my experience the version of Perl has made very very little difference in my life. If you have very specific needs (Unicode support, the fake Windows fork, etc.) then the version might matter. Otherwise, you're far more likely to run into problems of not having a particular module version (or worse, not having the module you need at all.) I've run scripts on machines with 5.004, 5.005, 5.6, and 5.6.1 and I've never had any problems related with the compiler itself... it's always been something external like a DB file or a module or something.

    Gary Blackburn
    Trained Killer

Re: what version of perl the server is running?
by little (Curate) on Aug 18, 2001 at 03:22 UTC
    This pdf-document also contains a history of perl and its capabilities at each version.
    But if you have such an old version running better upgrade to 5.6.x :-)

    Have a nice day
    All decision is left to your taste