Help for this page
my $LEN = 8; # Desired length my $match; ... } die "Didn't find a match" if not defined $input; print "First match: '$match'\n";
use List::MoreUtils 'firstval'; my $match = firstval { chomp; $LEN == length } <STDIN>;