open LIST, "ls|" || die;
open TEMPLATE, "../template.html" || die;

while (<TEMPLATE>){
    $_ =~ s/TITLE/$ARGV[0]/;
    $all .= $_;
}

while (<LIST>){
    chop;
#   next if (!/rpm/);
    $short = $long = $_;
    $short =~ s/-[0-9].*//;
    $all {$short} = $long;
    $expr = "@" . $short . "@";
    $all =~ s/$expr/$long/g;
}

@lines = split /\n/, $all;
foreach $l (@lines){
    $l =~ s/.*@.*//;
    print "$l\n";
}

