in reply to building structure from /etc/passwd files deux

Here's the entire script using DBD::AnyData -
#!/usr/bin/perl -w $|=1; use strict; use DBI; my $dbh=DBI->connect('dbi:AnyData(RaiseError=1):'); $dbh->func( 'users', 'Passwd', '/etc/passwd', 'ad_catalog'); $dbh->func( 'servers', 'CSV', '/etc/servers', {sep_char=>':',col_names +=>'username,s1,s2,s3'},'ad_catalog'); my $sth = $dbh->prepare(" SELECT users.username, homedir, shell, s1, s2, s3 FROM users NATURAL JOIN servers "); $sth->execute; while (my $r = $sth->fetch) { print "@$r\n"; }