Help for this page

Select Code to Download


  1. or download this
    perl -lne '$s=$_; END{ print "OK" if $s=~/^T/ }' /tmp/foo
    
  2. or download this
    perl -ne '$s=$_; END{ exit($s=~/^T/ ? 0 : 1) }' /tmp/foo
    
  3. or download this
    perl -MTie::File -e 'tie @f, "Tie::File", shift; exit 1 unless $f[-1] 
    +=~ /^T/' /tmp/foo
    
  4. or download this
    perl -MFile::ReadBackwards -e 'exit 1 unless File::ReadBackwards->new(
    +shift)->readline =~ /^T/' /tmp/foo