Whitey has asked for the wisdom of the Perl Monks concerning the following question:
#!/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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help removing first line from retrieved text file.
by mirod (Canon) on Jun 25, 2001 at 10:20 UTC | |
|
Re: Help removing first line from retrieved text file.
by lemming (Priest) on Jun 25, 2001 at 10:02 UTC | |
by Whitey (Novice) on Jun 25, 2001 at 10:07 UTC | |
|
Re: Help removing first line from retrieved text file.
by Beatnik (Parson) on Jun 25, 2001 at 10:03 UTC | |
|
Re: Help removing first line from retrieved text file.
by toma (Vicar) on Jun 25, 2001 at 10:17 UTC |