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

hi. im trying to transfer an asp page into another location through a perl script.i use getstore($url,$filename.html); what happens is certain tags like backcolor:activecaption and a few formatting tags of my asp are lost and the output in $filename.html is totally unformatted...what would be wrong?

Replies are listed 'Best First'.
Re: asp to html transfer through perl!!!
by ikegami (Patriarch) on Jul 13, 2007 at 05:18 UTC

    getstore saves what it receives as it received it. It doesn't know if it's HTML being received, so it can't change a single byte in case it's a binary file. If tags are "missing", the server didn't send them. If the output is unformatted, that's how the server sent it.

    That means there's either a serious bug in your LWP, or the server isn't sending what you think it's sending.

Re: asp to html transfer through perl!!!
by jasonk (Parson) on Jul 13, 2007 at 12:06 UTC

    I'd guess the reason that some tags are gone, is because it's an ASP, which means it was parsed by the server and some of those non-html tags were replaced with HTML output. As for it being unformatted, I'm guessing that you downloaded the HTML, and not the CSS that goes with it.


    We're not surrounded, we're in a target-rich environment!
      can u tell me how you can do that?
Re: asp to html transfer through perl!!!
by pKai (Priest) on Jul 13, 2007 at 12:58 UTC
    …and a few formatting tags of my asp are lost…

    "Lost" compared to what? IE source view?

    In my experience different browsers are served different for the same ASP web page by the ASP machine, i.e. IIS.

    This is most probably an IE/non-IE split.

    So by setting the "right" UserAgent the result hopefully will more likely meet your expectations.

      can u please ellaborate on the useragent?