Steve McConnell, author of the landmark I has put
up the chapters for the 2nd edition in PDF format on his website.
I needed to download them to take to Kinko's to have printed, since
I do all my best editing with a red pen on paper. This
little script did it for me.
use strict;
use WWW::Mechanize;
my $start = "http://www.stevemcconnell.com/cc2/cc.htm";
my $mech = WWW::Mechanize->new( autocheck => 1 );
$mech->get( $start );
my @links = $mech->find_all_links( url_regex => qr/\d+.+\.pdf$/ );
for my $link ( @links ) {
my $url = $link->url_abs;
my $filename = $url;
$filename =~ s[^.+/][];
print "Fetching $url";
$mech->get( $url, ':content_file' => $filename );
print " ", -s $filename, " bytes\n";
}
thanks for looking out for this. I enjoy reading bits of code complete on fridays while I'm ordering the fish and chips.
having a quick look (no mention of literate programming) it appears the c examples have been replaced with java
update no I was wrong.... cpp, vb and java examples included.