in reply to DBIx::Class Looping thru resultset

That definitely works; method name as $scalar. Not sure where it's falling down for you. As someone allergic to any kind of string concatenation, implied or literal, might I suggest something more like this–

my @db_colnames = qw( lastname firstname middlename ); my $rs = $schema ->resultset('myTable') ->search({}, { order_by => \@db_colnames }); for my $row ( $rs->all ) { my %data = $row->get_columns; print join("\t", @data{@db_colnames}), "\n"; }