Help for this page

Select Code to Download


  1. or download this
    use DBI;
    my $dbh = DBI->connect("DBI:CSV:f_dir=.;csv_sep_char=\t") or die "Cann
    +ot connect: " . $DBI::errstr;
    ...
    my $aref = $dbh->selectall_arrayref("select * from employees", {Slice=
    +>{}}, );  # AoH
    
    $dbh->disconnect();
    
  2. or download this
    package My::Employees;
    use base qw/Class::DBI/;
    ...
    my @all = My::Employees->retrieve_all;
    my $first = $all[0];
    warn $first->EMAIL;