Hi,

I apologize for my mistake. In future I will take care of sending all
the messages in proper fashion and in descriptive manner.

Regards
Irfan.


-----Original Message-----
From: Rob Dixon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 26, 2006 3:14 AM
To: beginners@perl.org
Subject: Re: Proper output

Sayed, Irfan (Irfan) wrote:
 >
 > I am not getting the proper output in @vob_rep Array.
 >
 > Following is my code
 >
 > # Perl script to change the replica name  >  > use strict;  >  > use
warnings;  >  > my $fname = "/tmp/vob_list1";  >  > open FILE,">",$fname
or die $!;  >  > my $fname1 = "/tmp/repl_list1";  >  > open
FILE1,">",$fname1 or die $!;  >  > my $CT = '/usr/atria/bin/cleartool';
>  > my $MT = '/usr/atria/bin/multitool';  >  > my @vob_list = `$CT
lsvob -s`;  >  > print FILE @vob_list;  >  > my @repl;  >  > my @repl1;
>  > foreach my $a (@vob_list)  >  > {  >
 >   @repl = `$CT lsreplica -s -invob $a`;
 >
 >   @repl1 = grep { /cmvobsvr1mum/i } @repl; print FILE1 @repl1; } my
 >   @vob_rep = splice(@repl1, 0, -10); print @vob_rep;
 >
 > close FILE1;


John W. Krahn wrote:
 >
 > What is it doing that you don't want it to do?  What is it not doing?


Sayed, Irfan (Irfan) wrote:
 >
 > Can any body please help on this

I can tell you what's probably wrong with your program Irfan, but I'm as
frustrated as Dani is that you didn't respond to John's question. You
may as well have written 'fix this please'.

The line

   my @vob_list = `$CT lsvob -s`;

puts the output from lsvob into @vob_list which, because of the -short
qualifier is just a list of VOB tags, but each one is terminated with a
newline. When you go to use the tags in the lsreplica command the
trailing newline is almost certainly messing up the -invob qualifier, so
I suspect your result is that no replicas are found?

To fix it, just

   my @vob_list = `$CT lsvob -s`;
   chomp @vob_list;

I hope that works for you, but please try to explain your problem
properly in future and also try to appear to have worked on it a little
yourself. And, like Dani said, please bottom-post.

For others' benefit, cleartool is a version control system, A VOB is a
Version Object Base.

Cheers,

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/>
<http://learn.perl.org/first-response>





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to