#!/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 $!; # > creates a new file, >> ap +pends print FH $wanted; close FH; # not really necessary in this simple scrip
In reply to Help removing first line from retrieved text file. by Whitey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |