From e3964f5eb66fe202fe7d3823ffdd38d5280bdb98 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Mon, 24 Jul 2023 23:43:51 -0600 Subject: [PATCH] Update ack2list.pl fixed errors --- pages/list-html-connections/ack2list.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pages/list-html-connections/ack2list.pl b/pages/list-html-connections/ack2list.pl index a84d621..d1fd10e 100755 --- a/pages/list-html-connections/ack2list.pl +++ b/pages/list-html-connections/ack2list.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w use strict; -my %h = {}; +my %h; while () { chomp; my ($file, $line, $tilde) = split /:/; @@ -8,8 +8,8 @@ while () { $file =~ s/\/home\//\/~/; $file =~ s/public_html\///; $h{$tilde}{$file}++; - } + print qq{Tilde.Club Connections @@ -19,14 +19,15 @@ print qq{Tilde.Club Connections print ""; for my $x (sort keys %h) { - print "\n" -}; + print "\n"; +} print "
$xis linked by"; + print "
$xis linked by"; for my $y (sort keys %{$h{$x}}) { - my $user = $y; - $user =~ m/(\~\w+)/; - print "$1 "; - + my $user = $y; + if ($user =~ /~(\w+)/) { + my $username = "~$1"; # Add the tilde (~) before the username + print "$username "; + } } - print "
"; print qq{};