my $dbh = DBI->connect( 'dbi:AnyData(RaiseError => 1):' ); $dbh->func( 'sms', 'Tab', $file, 'ad_catalog'); my $query = qq/select * from sms where "System Status" = '?'/; my $sth = $dbh->prepare( $query ); $sth->execute( 'ACTIVE' ); return $sth->fetchall_hashref( 'System Number' ); #### System Number\tSystem Status\tSystem Duration 10001 \tACTIVE \t600 10002 \tINACTIVE \t0 10003 \tACTIVE \t900 ...