Hi, This little glitch has caused me alot of "useless searching for why". I thought I was losing my mind. :-)
I'm trying to delete the first line of a file, using Tie::File and shift. It works for all the files I have except this one. On this file, it deletes the first line, and then truncates a large chunk of the file. Then on subsequent executions, works properly. I'm wondering if my Tie::File is bad, or whether the file is bad. It is a test file, which I made by cat file >>head.txt a few times, to build it up, so many of the lines repeat themselves. Can someone verify this problem? I've attached 'head.txt' because it's too big for cut-n-paste. The head.txt file has 13140 bytes on my system, and I expect after running the script, it should be 13108, BUT it drops to 8192. Then repeated executions run as expected. ####################################################### #!/usr/bin/perl use Tie::File; #deletes firstline of a file my $file = 'head.txt'; tie my @raw_data, 'Tie::File', $file or die "Cannot Open $file: $!"; shift @raw_data; untie @raw_data; ###################################################### -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
