On Wed, Apr 30, 2003 at 12:34:53PM -0000, Nick Ing-Simmons wrote: > any file handle which is buffered by stdio will have file position "wrong" > when used as in Subject: line Not exactly. Without the getc(), your example will print "FOO=0 BAR=0" for any file handle except DATA. > #!perl > open(FOO,__FILE__); > my $a = getc(FOO); > open(BAR,"<&FOO"); > print "FOO=",tell(FOO)," BAR=",tell(BAR),"\n"; > __END__ Normally, until the script explicitly reads/writes/seeks from F (or explicitly passes F to another process that does so), tell(F) == sysseek(F, 0, 1). With DATA however, this is not guaranteed. How about documenting this difference? -- Josh Purinton <perlbug20030421.5.jp@xoxy.net>Thread Next