Package Team use strict: use warnings; use DBI sub get_detail_team{ my ($team,$debug)=@_; my $dbh = connect to databasehandle my sql = get_sql_details($team,$debug) my $sth = $dbh->prepare($sql) $sth->execute() my $result = $sth->fetchall_arrayref(); return get_html_content($result,prama) } sub get_sql_details{ my ($team,$debug) = @_ my sql = "select id ,org,architec from table where team='$team" return $sql } sub get_html_content{ my ($result,$debug) = @_; return '

Could not locate architects.' if( scalar @$result == 0 ); my $html =
Id... foreach my $result_html(@result){ my ($id,$org,$architect) = @result_html $html.= $id>... return $html; }