おはようございます。私はプログラミングが初めてです。そして、私はPerlについて深く掘り下げたいと思います。 私はMechanizeの例を持っています - 単純ですが、私にとっては複雑すぎる:説明が必要です。これであなたの助けが必要です!機械化の例 - 私にとって単純すぎるが複雑すぎる:説明が必要
use strict;
$|++;
use WWW::Mechanize;
use File::Basename;
my $m = WWW::Mechanize->new;
$m->get("http://www.despair.com/indem.html");
my @top_links = @{$m->links};
for my $top_link_num (0..$#top_links) {
next unless $top_links[$top_link_num][0] =~ /^http:/;
$m->follow_link(n=>$top_link_num) or die "can't follow $top_link_num";
print $m->uri, "\n";
for my $image (grep m{^http://store4}, map $_->[0], @{$m->links}) {
my $local = basename $image;
print " $image...", $m->mirror($image, $local)->message, "\n"
}
$m->back or die "can't go back";
}
誰でも私にラインごとの説明を教えていただけますか?
あなたが言うようにプログラミングを初めてお使いの方は、オブジェクト、ネットワーキング、およびネストされたデータ構造を使用しないコードから始めたいと思うかもしれません。これらは、言語の基本的な構文をもっと難しくすることを試みるすべてのトピックです。 Perlの学習を始める方法については、いくつかの検索を試してみてください。 –
@エリック私はこれがhttp://stackoverflow.com/users/515484/apollomanおよびhttp://stackoverflow.com/users/515336/super-fast-birdとhttp://stackoverflow.comと同じ人だと信じています。/users/477580/thebutcherなどがあります。 –
@Sinan =>可能性があります...何をしているのですか? –