How script below in perl

Hi,
Can some one help on the below script to writen in perl. also i have list out the sample output.

I need to run on a windows env.

Thx!
Ashan

 $cat dmx3_all_cap_find.sh 

for file in `ll -l |awk '{print $9}`
do
H_NAME=$file
H_CAP=`cat $file |grep -i "GB" |sed 's/GB Total:/ /'`
echo " $H_NAME, \t$H_CAP"
done
 lnxpagrc10.txt,           663.0
 lnxpagrc11.txt,           969.0
 lnxpagrc12.txt,           357.0
 lnxqagrc04.txt,           663.0
 lnxqagrc05.txt,           867.0
 lnxqagrc06.txt,           357.0
 lnxsagrc07.txt,           663.0
 lnxsagrc08.txt,           969.0
 lnxsagrc09.txt,           357.0
 rs6qditim04.txt,          229.5
 rs6qditim06.txt,          178.5

ok, so perl in a win32 environment. run as "perl thisscript.pl dirname" where dirname is where you'd expect to find the files.

opendir(D, $ARGV[0] );
while ($H_NAME=readdir(D)) { 
   open(H,$H_NAME) || die "Failed to open $H_NAME: $!";
   while (<H>) { 
         print "$H_NAME\t$_" if (s/GB Total://);
   }
}