That's easy. Don't send the whole data, but request the data from Javascript when the user makes the first selection. For example the jQuery framework makes it really easy to request data without reloading the complete page. On the Perl side, you have a script that returns the options for the current selection.