Why not use memtest86? You can write the memtest86 image to a floppy, and use that floppy to boot the x86 machines to get the memory amount (and run tests on the memory to make sure it's good, to boot! -- pun intended).
The pesky cobalts will require another method, however.
And yes, you may deduct points from this suggestion since no Perl was used.