http://qs321.pair.com?node_id=377065


in reply to What specifically is the "file position"?

You could try asking the computer:
#!/usr/bin/perl use strict; use warnings; use Fcntl 'SEEK_END'; my $filename = "testfile"; create_file(); seek_file(); sub create_file { my $size = 4096; open OUTFILE, ">$filename" or die "can't open $filename: $!"; print OUTFILE "x" x $size or die "can't print to $filename: $!"; close OUTFILE or die "can't close $filename: $!"; } sub seek_file { open INFILE, "<$filename" or die "can't open $filename: $!"; my $result = sysseek INFILE, 0, SEEK_END; close INFILE; print "sysseek() returned $result\n"; } __END__ Output: sysseek() returned 4096