I went ahead and fixed it. On Thu, Mar 7, 2019 at 4:03 PM Gregory Lee Bartholomew <gregory.lee.bartholomew@xxxxxxxxx> wrote: > > Hi Paul, > > I found a bug in my PERL code in part 4 of the netboot series that I wrote. > > In https://fedoramagazine.org/how-to-build-a-netboot-server-part-4/, the line: > > my @ids = (0, sort keys %{$targets}); > > should have been: > > my @ids = (0, sort {$a <=> $b} keys %{$targets}); > > By default, PERL's sort function sorts lexicographically, so after the 10th > target, it returns (0, 1, 10, 2, 3, etc.). The added text forces the sort > function to sort numerically (0, 1, 2, 3, etc.). > > I understand if you don't want to revise such an old post. In case you chose not > to, I've CC'd the mail list so there is a chance that someone who encounters the > bug can find the solution. > > -- > Gregory Lee Bartholomew > PGP Key ID: 3B67510E > _______________________________________________ Fedora Magazine mailing list -- magazine@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to magazine-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/magazine@xxxxxxxxxxxxxxxxxxxxxxx