in reply to Running perl and outputting to file

Here's a hack of the google.pl script that is included when you download the API developer's kit. It uses the GoogleSearch module. In this example, it writes to results.html but that's easy enough to change.
#!/usr/bin/perl use strict; use warnings; use GoogleSearch; @ARGV > 0 or die "usage: $0 key [query] [max results]\n"; my ($key, $query, $max) = @ARGV; # $key='000000000000000000000000'; my $google = GoogleSearch->new($key); my $result = $google->doGoogleSearch( query => $query || 'related:www.perlmonks.org', maxResults => $max || 10, )->result; open(HTML, ">related.html"); print HTML qq(<a href="$_->{URL}">$_->{title}</a><br>\n) for @{$result->{resultElements}}; close(HTML);

Matthew Musgrove
Who says that programmers can't work in the Marketing Department?
Or is that who says that Marketing people can't program?