I trimmed it up a ton and gave that a shot, but I think I'm missing something on the syntax side.
Here's the full script (minus header)
Code:
system("clear"); #Clear the screen
print "Current CVS Module Versions\n\n";
@module = <*_v.pm>;
@module = glob("*_v.pm");
my $cnt=0;
foreach $f (@module){
# print "$cnt $f\n";
$ver = qx(tail -1 $f);
my ($name) = $f =~ /(.*)_v\.pm/;
if ($ver=~ /our \$Version\=/){
my ($rawver) = $ver =~ /\$Version\=\"(.*)/;
}else{
$ver="No version information available";
}
print "$cnt $name $rawver\n";
# push (@version,$ver,);
$cnt++;
}
print "\nFinished -[ Hit Enter ]\n"; #
$_ = <STDIN>; # Blank Variable for CR
#
The tail command I use gives this:
$ tail -1 adocsd_v.pm
our $Version="2.0.9 (2004.08.20 14:34)";
The whole thing gives me this error:
Code:
0 adocsd
Use of uninitialized value in concatenation (.) or string at version.pl line 41.
Line 41 is this:
Code:
print "$cnt $name $rawver\n";
Thanks very much for the input.
