in reply to is there a way download script source from web?

if you mean the source of the output, then LWP::Simple (see also this recent node: opening a webpage's source).

If you mean the actual (for example) perl source of a url like http://example.com/cgi-bin/foo.pl then no, it's not possible if the example.com's web server is configured properly. (if it were allowed it would be a huge security risk because people would be able to see the internals of your code)
  • Comment on Re: is there a way download script source from web?

Replies are listed 'Best First'.
Re^2: is there a way download script source from web?
by radiantmatrix (Parson) on Jul 12, 2005 at 19:24 UTC

    Seeing code should not be a security risk. Your code should not contain embedded passwords, etc. Also, the Open Source movement has shown that open and available code, combined with a mechanism for others to review and submit changes to that code, results in better security (in general).

    The reason script source isn't available is rather one of these:

    1. The source embodies a trade-secret or some sort of intellectual property.
    2. Script-capable web servers are configured to execute that code, so no mechanism is in place to simply tranfer it -- putting the file up in a downloadable form is an extra step, and most people simply don't bother.
    3. The code is either trivial or publicly available from a different forum (e.g. the Scoop code that drives Kuro5hin has its own site, so Kuro5hin doesn't publish it on the main site).
    Larry Wall is Yoda: there is no try{}
    The Code that can be seen is not the true Code
A reply falls below the community's threshold of quality. You may see it by logging in.