What i am tying to do is to is :get data fom database and with an delete button for each person (the button get id of every person) and delete this person the same for update and insert. But i dont know how to get id with that button.

use DBI;

use CGI::Carp qw(set_die_handler);
    BEGIN {
       sub handle_errors {
          my $msg = shift;
          print "content-type: text/html\n\n";
          print "<h1>Doli Problem!</h1>";
          print "<p>Pershkrim: $msg</p>";
          #proceed to send an email to a system administrator,
          #write a detailed message to the browser and/or a log,


my $q= new CGI;

print $q->header;
print $q-> start_html(
   -title 	=> "Main",
   -style  => {-src =>'/media/css/ui-lightness/jquery-ui-1.10.3.custom.css" rel="stylesheet' },
   -script => [ 
		{ -src=>'/media/js/jquery-1.9.1.js'},
		{ -src=>'/media/js/jquery-ui-1.10.3.custom.js' }

print $q->start_form;
print $q->table({},
			$q->th('Emri', 'Mbiemri', 'Seksi')

# Connect to the database

## mysql user database name
my $db = "personat";
## mysql database user name
my $user = "root";
## mysql database password
my $pass = "";
## user hostname : This should be "localhost" but it can be diffrent too
my $host="";
## SQL query
my $query = "select Emri,Mbiemri,Seksi from personi";
my $dbh = DBI->connect("DBI:mysql:$db:$host", $user, $pass);
my $sqlQuery  = $dbh->prepare($query)
or die "Can't prepare $query: $dbh->errstr\n";
my $rv = $sqlQuery->execute
or die "can't execute the query: $sqlQuery->errstr";
while ( my ($Emri, $Mbiemri, $Seksi) = $sqlQuery->fetchrow_array() ) {
     print STDOUT "$Emri  $Mbiemri  $Seksi";
     	$q->button( print $q->button(
        -id       => 'fshi',
        -name     => 'submit_form',
        -value    => 'Delete',

print $q->end_form;  
print $q->end_html;
i need some help please