#!/usr/SD/perl/bin/perl use lib './testlib'; use strict; use ObjTest; use Internal::DBI; my $dbh = logon(); my $sth = $dbh->prepare('select hostname from host'); $sth->execute; my @hosts = map { $_ = $_->[0] } @{ $sth->fetchall_arrayref }[0..20]; foreach my $name ( @hosts ) { my $host = ObjTest->new( name => $name ); my $true = $host->is_router(); print "RETURNED: $name is a router\n\n" if ( $true ); undef $host; } $sth->finish; $dbh->disconnect;