Both depend on what you already actually know. And it seems you know little about Javascript and Perl.
Without seeing any of the Perl code, it's hard to tell how easy or difficult modifying it would be. Here-documents usually tie the presentation a bit closer to the program than external templates, but the difference might be very small (one huge here-document) or very large (many tiny here-documents stitched together by much Perl logic).
If you plan on using Javascript anyway, consider coding the whole "hide" functionality in Javascript. You might or might not need to modify the Perl backend at all if using that approach.
|