#!/usr/bin/perl -w

# suck in a unzip listing and extract texture file names from it
# usage: cat file.txt | perl cleanlist.pl >file2.txt
#    or: type file.txt | perl cleanlist.pl >file2.txt

while (<>)
  {
  next unless /\.pcx/i; # only PCX or pcx
  next unless /[\/\\]/; # only with path
  chomp;
  $_ =~ /([a-z0-9\/\-\_]+\.pcx)/i;
  push @list, lc($1) if (defined $1); 
  }

foreach (@list)
  {
  print "$_\n";
  }
