[EMAIL PROTECTED] writes ..
> I am writing a small perl script which is included below. I 've
>a problem with this line my $prjstream = `cleartool lsstream -in
>@prjname[1]\@$ucmvob | grep Int` ; It doesn't recognise $ucmvob in
>this command. But if I replace the variable $ucmvob with the string
>"/ebppvobstore/vobs/UCMCQ" it works. I am not able to figure out why
>it doesn't work if I specify the variable. Not that the syntax of this
>command is "cleartool lsstream -in name@/ebppvobstore/vobs/UCMCQ".
>
>
>#!/usr/local/bin/perl
>use strict ;
>my $ucmvob = "/ebppvobstore/vobs/UCMCQ" ;
>my $PR_NAME = <STDIN> ;
>my $vobname = `cleartool lsproject -invob $ucmvob | grep $PR_NAME` ;
>my @prjname = split /\s+/, $vobname ;
>my $prjstream = `cleartool lsstream -in @prjname[1]\@$ucmvob
>| grep Int` ;
>my @Intstream = split /\s+/, $prjstream ;
>print "@Intstream[1] \n" ;
while those array slices are better written as scalar array members - that
shouldn't affect your $ucmvob .. it should interpolate perfectly and your
string should be
cleartool lsstream -in lsproject@/ebppvobstore/vobs/UCMCQ | grep Int
change your shebang line to
#!/usr/local/bin/perl -w
to switch on warnings - this will at least help you get rid of the array
slices (@prjname[1] and @Intstream[1])
--
jason king
In Georgia, you have the right to commit simple battery if provoked
by "fighting" words. - http://dumblaws.com/