in reply to Re: Help removing first line from retrieved text file.
in thread Help removing first line from retrieved text file.

I saw the code and have updated it as follows. The darned first line is still there.
#!/usr/bin/perl -w use strict; use LWP::Simple; my $data = get ("http://www.bloomberg.com/energy/index.html"); my ($wanted) = $data =~ /<!-+PETROLEUM-+>\s*(.*)\s*<!-+POWER-+>/s; open (FH,'>../data/file.txt') || die $!; print FH $wanted; close FH; open(FH, '+< ../data/file.txt') || die "Could not open $myfile $!\n"; @bar=<FH>; shift(@bar); seek(FH, 0, 0); truncate(FH, tell); print FH @bar; close(FH);