The other way to do is to use JavaScript.
<SCRIPT language="JavaScript">
function ThreeFrames(url1,url2,url3){
top.frame1.location=url1;
top.frame2.location=url2;
top.frame3.location=url3;}
</SCRIPT>
Then call it such as:
<a href="javascript:ThreeFrames('test1.html','test2.html','test3.html')">Test Page</a>
What this will do is change the frames within a frameset, allowing you to change frames on the fly.
However, this is all fine as long as the frames are the same, but if another frameset page has a different layout, then you could use JavaScript to set the locations of the pages, or you could use Chris' Perl script.
A JavaScript example would be:
<a href="FrameSetPage.html?page1=test1.html&page2=test2.html">Test</a>
The FrameSetPage.html would have the following code:
<html>
<title>Test Page</title>
<SCRIPT language="JavaScript">
function GetParam(name)
{
var start=location.search.indexOf("?"+name+"="

;
if (start<0) start=location.search.indexOf("&"+name+"="

;
if (start<0) return '';
start += name.length+2;
var end=location.search.indexOf("&",start)-1;
if (end<0) end=location.search.length;
var result=location.search.substring(start,end);
var result='';
for(var i=start;i<=end;i++) {
var c=location.search.charAt(i);
result=result+(c=='+'?' ':c);
}
return unescape(result);
}
</SCRIPT>
<SCRIPT language="JavaScript">
var pg1 = GetParam('page1');
var pg2 = GetParam('page2');
document.write('<frameset rows="100,*">');
document.write('<frame name="title" src="' + pg1 + '"');
document.write('<frame name="main" src="' + pg2 + '"');
</SCRIPT>
</html>