Perl - downloading files - proxy problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • c83
    New Member
    • Jun 2007
    • 24

    Perl - downloading files - proxy problem

    I am using Active Perl, and i-am having problems downloading files from internet because of the proxy.
    The script is workin when no proxy is present, but now it refuses to download files.
    Here is the script:
    Code:
    #use module
    use XML::Simple;
    use Data::Dumper;
    use LWP::Simple;
    
    #test function
    sub test_func
    {
    print "\n Test function starts:\n";
    my $data_file = "http://website.com/file.txt";
    
    my $remote_xml = get $data_file;
    print "File:\n $remote_xml";
    }
    
    test_func();
    What else i needed here ??
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    look into using LWP::UserAgent instead of LWP::Simple

    cpan LWP::UserAgent

    Comment

    • miller
      Recognized Expert Top Contributor
      • Oct 2006
      • 1086

      #3
      The only thing that I would do, and advise anyone else to do would be to read the extensive documentation.

      perldoc lwptut

      - Miller

      Comment

      • c83
        New Member
        • Jun 2007
        • 24

        #4
        Originally posted by miller
        The only thing that I would do, and advise anyone else to do would be to read the extensive documentation.

        perldoc lwptut

        - Miller
        Thank you for your advice. I -ve solved the problem.

        Comment

        • KevinADC
          Recognized Expert Specialist
          • Jan 2007
          • 4092

          #5
          Originally posted by miller
          The only thing that I would do, and advise anyone else to do would be to read the extensive documentation.

          perldoc lwptut

          - Miller

          Good suggestion. Note it will direct the reader to LWP::UserAgent in the case of a proxy.

          Kevin

          Comment

          Working...