#!/usr/bin/perl -w

use utf8;

$dir = "bridge";
opendir DIR, $dir or die "cannot open dir $dir: $!";
my @file= readdir DIR;
closedir DIR;

foreach $fh (sort(@file)){
	if(!(-d $fh)){
		if(! open(INPUT, "< bridge/$fh")){
    		die "cannot opent input file:";
		}
		print "$fh,";
		while($lines = <INPUT>){
    		$lines =~ s/\n/ /g;
    		$lines =~ s/[[:punct:]]//g;
    		print lc("$lines");
		}
		print "\n";
	}
}
close INPUT;
close STDOUT;
