in reply to DBI question

Thanks for all the help the output is thus
switchName: sugartown switchType: 12.4 switchState: Online switchMode: Native switchRole: Subordinate switchDomain: 1 switchId: fffc01 switchWwn: 10:00:00:60:69:90:59:21 zoning: ON (Production_Config) switchBeacon: OFF

Replies are listed 'Best First'.
Re^2: DBI question
by xtype (Deacon) on Jun 01, 2005 at 23:37 UTC
    You didn't say what you column names were!
    my %switch = map { split /:\s+/ } @lines; my @cols = sort keys %switch; my $rows = $dbh->do( "insert into foo (".join(',', @cols).") values (".join(',', ('?') +x@cols).")", undef, @switch{@cols} );

    ;^)

    -xtype