Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Query about perl modules

Expand Messages
  • Sreeram B S
    Hi Jeff, Thanks for giving me the correct interpretation of the book-example. I deleted the square-brackets ([]) and the code worked!! Thanks and Regards,
    Message 1 of 5 , Mar 16, 2005
      Hi Jeff,
      Thanks for giving me the correct interpretation of the book-example. I deleted the square-brackets ([]) and the code worked!!

      Thanks and Regards,
      Sreeram


      Jeff 'japhy' Pinyan <japhy@...> wrote:
      On Mar 16, Sreeram B S said:

      > blade:~/personal/perl > cat -n check.p
      > 1 #!/usr/bin/perl
      > 2
      > 3 use Net::Telnet;
      > 4
      > 5 $timeout = 10;
      > 6 $obj=new Net::Telnet( [Timeout => $timeout,] );
      > 7
      > blade:~/personal/perl > perl check.p
      > unknown remote host: ARRAY(0x22494) at check.p line 6
      > blade:~/personal/perl >

      Ah. In the documentation, when they have

      [Timeout => $timeout,]

      they meant "the Timeout parameter and its value are optional". You
      probably want to do something like:

      my $obj = Net::Telnet->new(Timeout => $timeout);

      but you probably also want to pass a Host parameter too.

      --
      Jeff "japhy" Pinyan % How can we ever be the sold short or
      RPI Acacia Brother #734 % the cheated, we who for every service
      http://japhy.perlmonk.org/ % have long ago been overpaid?
      http://www.perlmonks.org/ % -- Meister Eckhart


      Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html


      Yahoo! Groups SponsorADVERTISEMENT


      ---------------------------------
      Yahoo! Groups Links

      To visit your group on the web, go to:
      http://groups.yahoo.com/group/perl-beginner/

      To unsubscribe from this group, send an email to:
      perl-beginner-unsubscribe@yahoogroups.com

      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      ---------------------------------
      Do you Yahoo!?
      Yahoo! Small Business - Try our new resources site!

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.