#!/usr/bin/perl -w use strict; use warnings; use Text::CSV; my $csv = Text::CSV->new ({ binary => 1 }) or die "Cannot use CSV: ".Text::CSV->error_diag(); my $out = \*STDOUT; $csv->eol("\n"); mkdir "appdetails"; my ($info); while ($_ = ) { chomp; if (/^$/) { my $id = $info->{appID}; my $url = "http://store.steampowered.com/api/appdetails/?appids=$id"; print "wget '$url' -O appdetails/$id.json\n" if ! -e "appdetails/$id.json"; $info = {}; } else { my ($k, $v) = split /: /, $_, 2; $info->{$k} = $v; } }