#! /usr/bin/env perl use strict; use warnings; use Getopt::Long; use DBIx::Class::ResultSet; use Data::Dumper; use My::App::Schema; use Smart::Comments '###'; my $max_records = ''; GetOptions("max_records=i" => \$max_records) or die ("Error in command line arguments\n"); my @results = My::App::Schema->schema->resultset('MyTable')->all; for my $result ( @results ) { ### Processing Domain ID: ($result->id) for ( 0..$max_records ) { print $result."\n"; } }