#!/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; $wanted=~ s/^[^\n]*\n//s; # just remove the first line open (FH,'>../data/file.txt') || die $!; print FH $wanted; close FH;
In reply to Problem with Cron job by Whitey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |