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.
#!/usr/bin/perl -w
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";
}
yoink (Score:3, Informative)
thanks for looking out for this. I enjoy reading bits of code complete on fridays while I'm ordering the fish and chips [geocities.com].
having a quick look [stevemcconnell.com] (no mention of literate programming [c2.com]) it appears the c examples have been replaced with java :( - I would have been happier with cleaner examples in c.
update no I was wrong.... cpp, vb and java examples included.
bootload [netspace.net.au], groking softwa
Reply to This