Here is something to write test data because that was more fun and I am not helpful (sometimes, not always). :P

#!/usr/bin/env perl use strict; use warnings; use Data::Random qw(:all); use Getopt::Long; use URI; GetOptions( "categories=i" => \my $cats, "max-resources=i" => \my $max, "min-resources=i" => \my $min ) or die "Error in command line arguments\n"; $cats ||= 3; $max ||= 7; $min ||= 2; die "min-resources cannot be higher than max-resources" if $min > $max; for my $cat ( 1 .. $cats ) { printf "# <%s>\n\n", join " ", map uc, rand_words( min => 1, max = +> 8 ); for ( 1 .. $min + rand($max-$min+1) ) { my $name = join " ", map ucfirst, rand_words( min => 1, max => + 5 ); my @uri; push @uri, "www" if rand(1) > .5; push @uri, map lc, rand_words( min => 1, max => 3 ); push @uri, [qw/ com org co uk jp de nl /]->[rand 7] for 1 .. r +and(2); my @path = map lc, rand_words( min => 0, max => 3 ); my @query = map lc, rand_words( min => 0, max => 6 ); pop @query if @query % 2; my $uri = URI->new( join("/", join(".", @uri), @path) ); $uri->query_form(@query); my $desc = ucfirst join " ", map lc, rand_words( min => 3, max + => 9 ); printf "[%s] (%s) %s.\n\n", $name, $uri, $desc; } }

For actual feedback: POD (pod) is preferable to comments (usually, not always), lexical filehandles (open) are better than bareword, and real or at least mocked up test data is easier to work on so will elicit more helpful answers than mine… which in creating such might help elicit more helpful answers after all.


In reply to Re: RFC: My first GitHub contribution by Your Mother
in thread RFC: My first GitHub contribution by dollar_sign

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.