#!/usr/bin/env perl
use warnings;
use strict;
use 5.10.0;
# Extract name where given name matches "John":
while (<>) {
say "$2 $1" if m/^(.*)\t(Jo.*?)(\t|$)/i;
}
$ ./examples/filter_authors.pl examples/authors.tsv
John Brunner
John Tolkien
Jo Walton