All,
     When I use strict function, I get an error in the following code.
#!/usr/local/bin/perl
use strict ;
my @vob_list = `cleartool lsvob | grep "*"`;
my $entry ;
foreach $entry (@vob_list) {
chomp $entry;
my @fields = split /\s+/, $entry;
my $tag_list ;
my $vbs_list ;
@tag_list = @fields[1] ;
@vbs_list = @fields[2] ;
foreach $lock (@tag_list) {
print "$lock \n" ;
foreach $tardir (@vbs_list) {
print "$tardir \n" ;
}
}
}

Global symbol "tag_list" requires explicit package name at ./back.pl line 10.
Global symbol "vbs_list" requires explicit package name at ./back.pl line 11.
Global symbol "lock" requires explicit package name at ./back.pl line 12.
Variable "@tag_list" is not imported at ./back.pl line 12.
Global symbol "tag_list" requires explicit package name at ./back.pl line 12.
Variable "$lock" is not imported at ./back.pl line 13.
Global symbol "lock" requires explicit package name at ./back.pl line 13.
Global symbol "tardir" requires explicit package name at ./back.pl line 14.
Variable "@vbs_list" is not imported at ./back.pl line 14.
Global symbol "vbs_list" requires explicit package name at ./back.pl line 14.
Variable "$tardir" is not imported at ./back.pl line 15.
Global symbol "tardir" requires explicit package name at ./back.pl line 15.
Execution of ./back.pl aborted due to compilation errors.

I get this error only when I use the strict function, so I figured that this is
not an efficient code. Can somebody help me on this ?

Thx in advance
Kailash


Reply via email to