This may be a bit off... but I was wondering, why not use Win32 module? It has the nice Win32::IsWinNT() and
Win32::IsWin95(). I'm making a bit of assumption that Win32::IsWin95() would work with Win98 as well. I'm not sure. Anyways, just a suggestion - it may not fit your needs.