Sometimes it’s just easier and faster to manually edit HTML than to try and program it out. Provided the editing isn’t prohibitive, taking the flat file HTML produced by php or perlĀ and just fixing it there rather than spending hours on end trying to code it out works for me.