Lock is a perl function

 

http://perldoc.perl.org/functions/lock.html

 

 

 

#! /usr/bin/perl

 

# Perl script to take the backup of critical clearcase data

 

@vob_lst=(qw(test test1 test2));

 

 

foreach $a (@vob_lst) {

 lockvob($a);

}

 

 

 sub lockvob {

            local ( $lockitem ) = @_ ; 

 print "Locking VOB:\t$lockitem \n";

 #`/usr/atria/bin/cleartool lock:$a`;

 #if($?){print "Locking of VOB $lock failed\n";}

 #else{print "Locking of VOB $lock done\n";

 #}

}

 

 

 

Stewart Anderson

Application Support Analyst 
Sky Network Services (SNS)

Extension: 7212
Direct Line: +44 (0) 20 7032 7212
Email: [EMAIL PROTECTED]

Support Team Email:  [EMAIL PROTECTED]
<blocked::mailto:[EMAIL PROTECTED]>  

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 09 July 2008 14:33
To: beginners@perl.org
Subject: function call help

 

Hi All,

 

I facing one issue in Perl script.  I am executing one command in Perl
script and taking the output of that command in one array.  Now I want
to execute some more commands on each value of the array.

 

But the problem is that I am passing each value of the array as a
argument to that function but somehow it is not taking that value.

 

The output of the perl script is:

 

bash-3.00# perl backup.pl

/vob/test

Locking VOB 0

cleartool: Error: Unrecognized command: "lock:0"

Locking of VOB 0 failed

 

Now what I want is I need value "/vob/test" instead of 0.

 

Please find the attached perl script.

 

Please help/guide me.

 

Regards

Sayed.

 

Information in this email including any attachments may be privileged, 
confidential and is intended exclusively for the addressee. The views expressed 
may not be official policy, but the personal views of the originator. If you 
have received it in error, please notify the sender by return e-mail and delete 
it from your system. You should not reproduce, distribute, store, retransmit, 
use or disclose its contents to anyone. Please note we reserve the right to 
monitor all e-mail communication through our internal and external networks. 
SKY and the SKY marks are trade marks of British Sky Broadcasting Group plc and 
are used under licence. British Sky Broadcasting Limited (Registration No. 
2906991), Sky Interactive Limited (Registration No. 3554332), Sky-In-Home 
Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited 
(Registration No. 2340150) are direct or indirect subsidiaries of British Sky 
Broadcasting Group plc (Registration No. 2247735). All of the companies 
mentioned in this paragraph are incorporated in England and Wales and share the 
same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.

Reply via email to