#! /usr/bin/perl

$arch = "~/frek/bartek1002/fullkkrd.zip";

open LIST, "unzip -l $arch |";

while ($entry=<LIST>) {
    next unless $entry =~ m/^ *[0-9]+  [0-9-]+ [0-9:]+   (.+)$/;
    $x = $1;
    $y = $x;
    $x =~ s///g;
    $y =~ tr[][濱];
    print "Brak pliku: $x\n" 
	unless -f $x;
    next if $x eq $y;
    print "'$x' -> '$y'\n";
    rename $x, $y;
}
