This is my script, what changes should i make.
#+++++++++
#!c:\perl\bin\perl
open(FD,"<c:\\att.txt");
#open(FD,"<\\\\blrk35ed\\temp1\\vob.txt");
@vobs=<FD>;
chomp($_);
foreach $cmd1(@vobs){
chomp($cmd1);
#print "Attributes in VOB $cmd1\n";
@cmd_merge=`cleartool lstype -kind attype -s -invob \\$cmd1`;
foreach $cmd2(@cmd_merge){
chomp($cmd2);
#print "$cmd2";
#@attt=`cleartool desc attype:$cmd2`;
#@attt="cleartool desc attype:$cmd2\@vob:/$cmd1";
#@attt = 'cleartool desc attype:$cmd2\@vob://$cmd1';
@attt = "cleartool desc attype:$cmd2\@vob://$cmd1";
foreach $cmd3(@attt)
{
#print "$cmd3";
}
system ("clearprompt proceed -mask proceed -default proceed -pre -prompt
\"The Attributes are $attt[$#attt]\"");
#print "$attt[$#attt]";
}
}
close(FD);
#cleartool desc attype:SYNC_CHECK@vob:/train
#+++++++++
Regards
j
-----Original Message-----
From: Sudarshan Raghavan [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 11:35 AM
To: Perl beginners
Subject: Re: statement
On Mon, 7 Oct 2002, Dharmender Rai wrote:
> your string is not getting interpolated for $cmd2
> bacause you are using `` instead of '' or "" . If you
> want to use `` then don't use $cmd2 or split the
> string into many.
Variables do get interpolated inside backticks. They do not get
interpolated inside single quotes (''). Did you try it out?
>
> --- Javeed SAR <[EMAIL PROTECTED]> wrote: > Hi
> All,
> >
> >
> > I am executing a command from command line, it
> > working fine,when i give in
> > perl it's not working.
> > The command which i gave in command line is :
> > c:>cleartool desc attype:SYNC_CHECK@vob:/train
> > what i gave in perl is as follows:
> > I am passing the variable here instead of
> > SYNC_CHECK.
> > @attt = `cleartool desc attype:$cmd2\@vob://$cmd1`;
What makes you say that this is not working? Did you check $? for the exit
status or is it based on the contents of @attt? Are you running this on
unix or windows? Why do you have two '/' before $cmd1? Did you check the
contents of $cmd2 and $cmd1?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]