- or download this
my %order_line = read_from_csv();
my @fields = qw(firstname lastname);
my %identity;
@identity{@fields} = @order_line{@fields};
my $customer = Customer->find_or_create(\%identity);
- or download this
my %order_line = read_from_csv();
my @fields = qw(firstname lastname);
my $customer =
Customer->find_or_create({ map {$_ => $order_line{$_}} @fields });
- or download this
#!/usr/bin/perl
...
# Rate with_map with_slice
# with_map 110277/s -- -28%
# with_slice 153325/s 39% --