or download this
use Win32::TieRegistry( Delimiter=>"/", ArrayValues=>0 ) ;
$openKey = $Registry->{"LMachine/SYSTEM/CurrentControlSet/Services/tft
+pd/parameters/"} ;
$tftpdDir = $openKey->{"/directory"} ;
...
undef $tftpdDir ;
undef $openKey ;
exit 0;