home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / MacPerl 4.1.3 / Perl / t / io / tell.t < prev   
Encoding:
Text File  |  1993-10-23  |  1.2 KB  |  26 lines  |  [TEXT/MPS ]

  1. #!./perl
  2.  
  3. # $Header: tell.t,v 4.0 91/03/20 01:51:14 lwall Locked $
  4.  
  5. print "1..13\n";
  6.  
  7. $TST = 'tst';
  8.  
  9. open($TST, '::Makefile') || open($TST, ':::Makefile') || (die "Can't open ::Makefile");
  10.  
  11. if (eof(tst)) { print "not ok 1\n"; } else { print "ok 1\n"; }
  12.  
  13. $firstline = <$TST>;
  14. $secondpos = tell;
  15.  
  16. $x = 0;
  17. while (<tst>) {
  18.     if (eof) {$x++;}
  19. }
  20. if ($x == 1) { print "ok 2\n"; } else { print "not ok 2\n"; }
  21.  
  22. $lastpos = tell;
  23.  
  24. unless (eof) { print "not ok 3\n"; } else { print "ok 3\n"; }
  25.  
  26. if (seek($TST,0,0)) { prin