To summarise what Charles said: You will never notice a difference in CPU processing time between PHP and Perl, the file IO is the limiting 'bottleneck' in the total processing time between HTTP request, and page display in the browser.
I maintain a version 5 UBB that had over 25 THOUSAND members until I pruned back to just the active ones yesterday- 4000 or so.
And that site is on an shared, modest server. So from my experience, UBB can handle HUGE amounts of inactive members, and is also happy with several thousand active ones.