Rosetta Code/Count examples: Difference between revisions

Content added Content deleted
m (→‎{{header|Raku}}: New URL for relocated site)
m (→‎{{header|Perl}}: update URL)
Line 1,833: Line 1,833:


=={{header|Perl}}==
=={{header|Perl}}==
{{libheader|HTTP:Tiny}}
<syntaxhighlight lang="perl">use HTTP::Tiny;
<syntaxhighlight lang="perl">use HTTP::Tiny;


my $site = "http://rosettacode.org";
my $site = "http://rosettacode.org";
my $list_url = "/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml";
my $list_url = "/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml";


my $response = HTTP::Tiny->new->get("$site$list_url");
my $response = HTTP::Tiny->new->get("$site$list_url");
Line 1,848: Line 1,847:


{{libheader|Mojolicious}}
{{libheader|Mojolicious}}
<syntaxhighlight lang="perl">use v5.10;
<syntaxhighlight lang="perl">use Mojo::UserAgent;
use Mojo::UserAgent;


my $site = "http://rosettacode.org";
my $site = "http://rosettacode.org";