It is not that you can just execute Internal Commands, you can execute any EXE/COM file present on your system, provided the path of that file is set-up in Environment Variable (Path)..

For your code
Code:
p.StandardInput.WriteLine(@"perl extract.pl test.htm > test.out");
Setup up the Path of perl file and then try!
Or
Just change the directory to the location where your files exist and then run your Perl compiler/command...
Something like this
Code:
p.StandardInput.WriteLine(@"chdir \MyPerlDirectory");
And then run the above command...

HTH