#! c:/perl/bin/perl.exe # By me- March 2007 use strict; use Archive::Tar; #use Archive::Zip; system(cls); my $tar = Archive::Tar->new(); opendir (DIR, $ARGV[0]) || die "\nHey, gimme a path to work with please!\n"; my @dirs = readdir (DIR); unlink ("$ARGV[0]\\modinfo.txt"); foreach my $dir (@dirs) { next if ($dir eq '.' || $dir eq '..'); $tar->read("$ARGV[0]\\$dir", 1); @_ = $tar->list_files(); for my $modinfo (@_) { next unless ($modinfo =~ /modinfo.txt/); $tar->extract_file( $modinfo, "$ARGV[0]\\modinfo.txt"); open(FILE,"$ARGV[0]\\modinfo.txt") || die "D'oh: need a lot of help here!"; chomp (my @stuff = ); for my $line (@stuff) { next unless ($line =~ /vx/); $line =~ s/^\s+//; $line =~ /(\w+)\s+(\w+)\s+(\w+)\s+(\d+)\s+(\d+)\s+(\w+)\s+\((.+)\)$/; printf "%s, %s,%s,%s,%s,%s,%s,(%s)\n",$dir,$1,$2,$3,$4,$5,$6,$7; } } }