Sponsored Content
Top Forums Shell Programming and Scripting Perl : Global symbol requires explicit package name Error while executing Post 302785759 by scriptscript on Tuesday 26th of March 2013 10:22:24 AM
Old 03-26-2013
Perl : Global symbol requires explicit package name Error while executing

I have executed the below perl script for copying the file from one server to another server using scp.

Code:
#!/usr/bin/perl -w
use Net::SCP::Expect;
use strict;
$server= "x.x.x.x";
my $source = "/mypath/mypath";
my $destination = "/home/";
print "Login...Starting scp...";
$user="admin";
$password="admin";
print "Login...Starting scp...";
my $scpe = Net::SCP::Expect->new(host=>$server, user=>$user, password=>$password, recursive=>'1', auto_yes => '1', auto_quote => '0');
$scpe->scp('x.x.x.x:/mypath/*.csv',$destination);
print "SCP complete\n";

But I have received the below errors
Code:
DC01INETSRV2[Johng]/s0/home>perl sftptest.pl
Global symbol "$server" requires explicit package name at sftptest.pl line 11.
Global symbol "$user" requires explicit package name at sftptest.pl line 15.
Global symbol "$password" requires explicit package name at sftptest.pl line 16.
Global symbol "$server" requires explicit package name at sftptest.pl line 20.
Global symbol "$user" requires explicit package name at sftptest.pl line 20.
Global symbol "$password" requires explicit package name at sftptest.pl line 20.
Execution of sftptest.pl aborted due to compilation errors.

COuld anyone please help me on the above errors.

Thanks in advance...

Regards,
J
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SFTP error:-b requires an argument greater than zero

Hi when i execute the below command sftp -b ftpCommand.ksh remoteuser@remoterserver i am getting the error "-b requires an argument greater than zero" Please can any one help me. (1 Reply)
Discussion started by: vgs
1 Replies

2. Shell Programming and Scripting

SFTP error:-b requires an argument greater than zero

Hi when i execute the below command sftp -b ftpCommand.ksh remoteuser@remoterserver i am getting the error "-b requires an argument greater than zero" Please can any one help me. (4 Replies)
Discussion started by: vgs
4 Replies

3. Shell Programming and Scripting

change requires with perl

Hi, i need to change a file with perl having contents below, but it will not do any action if change is being already made. file.txt AAAAAA BBBBBB CCCCCC output.txt (that required) AAAAAA #BBBBB DDDDDD CCCCCC Thanks, (2 Replies)
Discussion started by: learnbash
2 Replies

4. Shell Programming and Scripting

Error executing shell command from a perl script

Hi Gurus, I've a find command that gets the list of files from a source directory where the extension is not html, xml, jsp, shtml or htaccess. The below find command runs fine from the command prompt or in a shell script. I need to eventually run it in a PERL script and am getting the... (5 Replies)
Discussion started by: voorkey
5 Replies

5. Shell Programming and Scripting

Error in executing Perl script

Hello All I am facing an issue The unix script is running fine in unix environment which uses ssh connection but when I try to run the same in informatica environment (same server where I was running the unix script manually successfully) its showing the below error command-line line 0:... (11 Replies)
Discussion started by: Pratik4891
11 Replies

6. UNIX for Dummies Questions & Answers

Can't install rpm package with --prefix in new path.Error: package is not relocatable

Hello, i have downloaded an rpm package "hadoop-0.20.205.0-1.amd64.rpm" in /usr/local/ directory. I'm trying to install the rpm package in a new path/location (/usr/local/hadoop-0.20.205), but i can't. I did: 1st try: Didn't work sudo rpm -i --prefix=/usr/local/hadoop-0.20.205... (1 Reply)
Discussion started by: g_p
1 Replies

7. Emergency UNIX and Linux Support

Problem when trying to remove a package using rpm command - error: package is not installed

Hello, i have installed a package by using the command sudo rpm -i filepackage.rpm package filepackage is already installed when i try to remove it, i get an error saying "is not installed": sudo rpm -e filepackage.rpm error: package filepackage is not installed How can... (4 Replies)
Discussion started by: g_p
4 Replies

8. Shell Programming and Scripting

Perl : meaning of ||= symbol

While going through the below perl code, there is a line which contains $sheet -> {MaxRow} ||= $sheet -> {MinRow}; Could anyone please explain the meaning of ||= and where it is used complete code --------------- foreach my $sheet (@{$excel -> {Worksheet}}) { ... (2 Replies)
Discussion started by: giridhar276
2 Replies

9. Shell Programming and Scripting

Executing perl script in Linux gives :Exec format error. Wrong Architecture

i have perl script that used to be working great , once i edit it in windows and convert it to UTF-8 and then via FTP return it . also did: chmod +x foo.pl and then when i try to run it : ./foo.pl im getting this error: ./foo.pl: Exec format error. Wrong Architecture.... (4 Replies)
Discussion started by: umen
4 Replies

10. Solaris

Global zone has an older version of package: pkg://Solaris/system/library

I try to install php-56 in a zone, but I have the following problem: pkg install php-56 Creating Plan (Running solver): \ pkg install: No solution was found to satisfy constraints maintained incorporations: None Creation Plan: dependency error (s) in proposed packages: Not... (0 Replies)
Discussion started by: ymk369
0 Replies
PQLIST(1)							      pqlist								 PQLIST(1)

NAME
pqlist - List available NetWare print queues SYNOPSIS
pqlist [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ pattern ] DESCRIPTION
pqlist lists all the NetWare print queues available to you on some server. If you are already connected to some server, this one is used. If pqlist does not print to a tty, the decorative header line is not printed, so that you can count the printing queue available on your server by doing pqlist -S server | wc -l pqlist looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of .nwclient MUST be 600, for security reasons. OPTIONS
pattern pattern is used to list only selected queues. You can use wildcards in the pattern, but you have to be careful to prevent shell inter- pretation of wildcards like '*'. -h -h is used to print out a short help text. -S server server is the name of the server you want to use. -U user name If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your NetWare user name. -P password You may want to give the password required by the server on the command line. You should be careful about using passwords in scripts. -n -n should be given to mount shares which do not require a password to log in. If neither -n nor -P are given, pqlist prompts for a password. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. SEE ALSO
nwclient(5), nprint(1), slist(1), ncpmount(8), ncpumount(8) CREDITS
pqlist was written by Volker Lendecke (lendecke@math.uni-goettingen.de) pqlist 01/10/1996 PQLIST(1)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy