http://www.perlmonks.org?node_id=1010372


in reply to Just trying to TELNET

it states that I am Missing right curly bracket, but I do not even have a LEFT one????

Missing right curly or square bracket at

Yeah, the error message says that if you try to start an anonymous array grouping with a left bracket, the code needs a right bracket somewhere to close it off. You need to read between the lines in those error messages. :-) Here is your left bracket.

Port => '7300', [Errmode => 'die', Timeout => '9'); #My guess is that it should look like this: Port => '7300', [Errmode => 'die', Timeout => '9'] );
Also, I don't think you need single quotes around '7300' as 7300 is a number not a string.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Just trying to TELNET
by Anonymous Monk on Dec 31, 2012 at 22:01 UTC
    That solved the MISSING RIGHT CURLY BRACKET, but now it states that here is a syntax error near Port.
      use diagnostics;

      When the messages generated with use strict; use warnings; are beyond your understanding, add diagnostics to your arsenal. See also perldoc splain.

      OK got it to work with the following code:
      $telnet = new Net::Telnet ( Timeout=>10, Port=>7300, Errmode=>'die'); $telnet->open('localhost')
      Thanks for your help, it is appreciated