in reply to Converting to CGI.pm

Fingo, the pod associated with CGI.pm is quite extensive. However, just to give you a clue:
print ol(li(\@array));
does it all in one line.