Sponsored Content
Full Discussion: PERL Error
Top Forums Programming PERL Error Post 302188589 by Asteroid on Thursday 24th of April 2008 01:54:42 AM
Old 04-24-2008
PERL Error

hi,

I am trying following TELNET script on SunOS terminal01 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Blade-100.

I am stuck up due to an Error I cannot fix out. please can some one here can help me out. I must be thankful.


code:

Quote:
#
# A Telnet SCRIPT
#
# REMOTE TELNET FETCH UPTIME
#

#!/usr/bin/perl -w
clear();
echo "***************************************\n";
echo "***** A Telnet Script ***** \n";
echo "***************************************\n\n";
echo "TELNET Tunnels in progress, Hold on. \n";

use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die');
$telnet->open('100.400.400.600');
$telnet->waitfor('/login: $/i');
$telnet->print('root');
$telnet->waitfor('/Password: $/i');
$telnet->print('xxxxxxxx');
$telnet->waitfor('/# $/i');
$telnet->print('uname -a');
$output = $telnet->waitfor('/# $/i');
print $output;
Error
Quote:
/data/script.pl: use: not found
/data/script.pl: syntax error at line 15: `(' unexpected

output for perl -V

Quote:
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos localhost 5.8 sun4u sparc sunw,ultra-1 '
hint=previous, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-xO3 -xdepend', gccversion=
cppflags=''
ccflags =''
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.00503/sun4-solaris/CORE'
cccdlflags='-KPIC', lddlflags='-G'


Characteristics of this binary (from libperl):
Built under solaris
Compiled at Dec 22 1999 00:00:57
@INC:
/usr/perl5/5.00503/sun4-solaris
/usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris
/usr/perl5/site_perl/5.005
THX and REgards

Last edited by Asteroid; 04-24-2008 at 03:04 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Error

# perl -p -w -e 's/</book>(?:\n)<collection>(.*)</collectioninfo>//g' test1.txt Bareword found where operator expected at -e line 1, near "s/</book>(?:\n)<collection>(.*)</collectioninfo" Unquoted string "collectioninfo" may clash with future reserved word at -e line 1. syntax error at -e line... (3 Replies)
Discussion started by: dirdamalah
3 Replies

2. Shell Programming and Scripting

Perl script error

Hi all I keep getting a segmentation fault error while running the script below. #!/usr/bin/perl -w use CGI ':standard'; use GD::Graph::pie; use strict; use warnings; sub trim($) { my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; ... (4 Replies)
Discussion started by: pietie
4 Replies

3. Shell Programming and Scripting

Error in PERL

Hi All, I was trying to run the below program, its working perfectly for if condition however its not go to else conditing, if the input is wrong. what is the issue in this code. kindly help me !!! print "Enter your Number \n"; $name = <STDIN>; if ($name ="91111") { @dirlist1 =... (4 Replies)
Discussion started by: adaleru
4 Replies

4. Shell Programming and Scripting

Perl programming error

Hi, everyone!! i am new to perl programming.. plz help me. #!C:/perl/bin use warnings; use strict; use Text::CSV_XS; my @rows = ""; my $row; my $count; my $fh; my @fields = ""; my $csv = Text::CSV_XS->new ({binary =>1}) or die "cannot use CSV:" .Text::CSV->error_diag (); open... (3 Replies)
Discussion started by: kvth
3 Replies

5. Shell Programming and Scripting

Perl error. Help please

At this line in the perl script, @databases = `crs_stat | grep .db | awk -F. '{print $2}'`; It is throwing this error. Use of uninitialized value in concatenation (.) or string at ........ Looks like it didn't like the 2 dots I have in the statements. Is there a way to get around this... (3 Replies)
Discussion started by: MKNENI
3 Replies

6. Shell Programming and Scripting

PERL error handling

I have a PERL command line embedded in a UNIX script. The script doesn't handle errors coming out of this command. I'm processing large files and occassionally I run out of disk space and end up with half a file. perl -p -e 's/\n/\r\n/g' < TR_TMP_$4 > $4 How do I handle errors coming out... (1 Reply)
Discussion started by: OTChancy
1 Replies

7. Shell Programming and Scripting

Perl error

New to perl, trying to decipher and fix the below error: Thanks. $ perl -ne 'chomp; system ("perl table_annovar.pl $_ humandb/ -buildver hg19 -protocol refGene,popfreq_all -operation g,f -otherinfo”)' < file.txt Can't find string terminator '"' anywhere before EOF at -e line 1. (2 Replies)
Discussion started by: cmccabe
2 Replies

8. Shell Programming and Scripting

Perl error

cat "C:\Program Files\BioDiscovery\Nexus 7\Organisms\Human\NCBI Build 37\refseq_genes.txt" | perl -aF/\\t/ -lne '$F=~/_/ and next; @st=split/\,/,$F;@en=split/\,/,$F;print join("\t",$F,$st,$en,$F) for (0..$#st)' | sort -u > refseq_exons.bed sort: open failed: -u: No such file or directory ... (6 Replies)
Discussion started by: cmccabe
6 Replies

9. Shell Programming and Scripting

Perl command error

In the attached file I get this error. Thank you :). C:\cygwin\home\cmccabe\windows_annovar.sh: line 117: perl: command not found (17 Replies)
Discussion started by: cmccabe
17 Replies

10. AIX

Perl error : perl: warning: Setting locale failed.

This's my problem perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = "en_US.UTF-8", LC__FASTMSG = "true", LC_MESSAGES = "", LC_CTYPE = "en_US.UTF-8", LC_TYPE = "en_US.UTF-8", LANG = "EN_US"... (1 Reply)
Discussion started by: bobochacha29
1 Replies
Regexp::Common::URI::telnet(3)				User Contributed Perl Documentation			    Regexp::Common::URI::telnet(3)

NAME
Regexp::Common::URI::telnet -- Returns a pattern for telnet URIs. SYNOPSIS
use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{telnet}/ and print "Contains a telnet URI. "; } DESCRIPTION
$RE{URI}{telnet} Returns a pattern that matches telnet URIs, as defined by RFC 1738. Telnet URIs have the form: "telnet:" "//" [ user [ ":" password ] "@" ] host [ ":" port ] [ "/" ] Under "{-keep}", the following are returned: $1 The complete URI. $2 The scheme. $3 The username:password combo, or just the username if there is no password. $4 The username, if given. $5 The password, if given. $6 The host:port combo, or just the host if there's no port. $7 The host. $8 The port, if given. $9 The trailing slash, if any. REFERENCES
[RFC 1738] Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994. SEE ALSO
Regexp::Common::URI for other supported URIs. AUTHOR
Damian Conway (damian@conway.org) MAINTAINANCE
This package is maintained by Abigail (regexp-common@abigail.be). BUGS AND IRRITATIONS
Bound to be plenty. LICENSE and COPYRIGHT This software is Copyright (c) 2001 - 2009, Damian Conway and Abigail. This module is free software, and maybe used under any of the following licenses: 1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD Licence. See the file COPYRIGHT.BSD. 4) The MIT Licence. See the file COPYRIGHT.MIT. perl v5.18.2 2013-03-08 Regexp::Common::URI::telnet(3)
All times are GMT -4. The time now is 02:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy