##
perl -ne '$s=$_; END{ exit($s=~/^T/ ? 0 : 1) }' /tmp/foo
####
perl -MTie::File -e 'tie @f, "Tie::File", shift; exit 1 unless $f[-1] =~ /^T/' /tmp/foo
####
perl -MFile::ReadBackwards -e 'exit 1 unless File::ReadBackwards->new(shift)->readline =~ /^T/' /tmp/foo