Being an old perl hacker I have to at least suggest doing whatever you're attempting in perl.
Yeah I agree but I have found myself needing to duplicate so much work moving between nix and windows that I resolve to just using UnxTools under windows so I stay with shell scripting so I can move work back and forth. I don't always have the luxury of installing Perl in windows.
With the portable vanilla Perl distro coming along that may change! I do know a smidge of Perl and I love it, its easy to do some great things with.
jlc