Dear monks,
Pl help me understand, what is going on here!!
I just started venturing into Object Oriented Perl. I am refferring Simon Cozen 'Beginning Perl'. OO concept is explained using the script given below. For me it is not producing anything. After execution of script, it gives me doller prompt again!!
use warnings; use strict; use Net::FTP; my $ftp=Net::FTP->new("ftp.cpan.org") or die "Couldnt connect:$@\n"; $ftp->login("anonymous"); $ftp->cwd("/pub/CPAN"); $ftp->get("README.html"); $ftp->close;
After going through Net::FTP doucumentation from CPAN I found under CONSTRUCTOR heading, an argument for firewall is given under subheading FIREWALL. last line says
This kind of setup is also referred to as an ftp proxy
As my institute uses proxy so I tried script with constructor line as
my $ftp=Net::FTP->new("ftp.cpan.org","XXXX")
(XXXX-My institute's proxy)
This time I got an error msg
Couldnt connect:Net::FTP: Bad hostname '' Also in the same subheading FIREWALL, it mentions about environment variable FTP_FIREWALL. How can I see the settings of my environment variables??
Any documentation link regarding this, any pointer, suggestions, guidance is welcome and appriciated. Thank you for reading this much.

In reply to Problem with Net::FTP by cool

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.