Perl, Show Password after Click : I'm a absolute beginner with Perl,

I have a table with 7 columns, one of it contains passwords (pw)
I dont want to show the passwords plain on that website, I would like to have a some kind of "click to expand" in taht table for every password to show it.
Hope someone can help...

Here is a part of that Script which contains the table:

    ....
    push @certlist, { state => $cert[0], 'expire' => $date, 'subject' => $cert[5], 'cn' => $cn, 'ip' => $ccd_ips->{$cn}, 'dl' => '', 're' => '', 'pw' => $password->{$cn}};

...

         return $q->table({'class' => 'certs' },
                       $q->Tr( [ $q->th(['Status', 'Common Name','D','Password','Ablaufdatum', 'Subject', 'IP-Adresse', 'R'])."\n",
        
                             map {
                                 $q->td( { 'class' => $_->{'state'} }, $states{$_->{'state'}} ).
                                 $q->td([@$_{qw(cn dl pw expire subject ip re)} ])."\n"
                             } @certlist ] ))."\n";
    .....