#!/usr/bin/perl -w # first_residue < foo.a2m # # reads an a2m file and returns the first aligned (uppercase) # character in a sequence while() { next if /^>/; if (/([A-Z])/) { print $1; exit(0); } } die "ERROR: first_residue couldn't find any aligned letters in a2m file\n";