From f8ca01cc51874a9cf4b506731679abdc4a5f0c14 Mon Sep 17 00:00:00 2001 From: Ysmael Ebreo Date: Sat, 9 May 2020 21:31:54 +0800 Subject: Deleted unnecessary variable --- challenge-059/yet-ebreo/perl/ch-1.pl | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/challenge-059/yet-ebreo/perl/ch-1.pl b/challenge-059/yet-ebreo/perl/ch-1.pl index 37a061d69f..1a17da0134 100644 --- a/challenge-059/yet-ebreo/perl/ch-1.pl +++ b/challenge-059/yet-ebreo/perl/ch-1.pl @@ -26,7 +26,7 @@ while ($link->iter) { $dnlink->add($i); } print $i; - print " -> " if $link->next + print " → " if $link->next } #Join dnlink and uplink @@ -38,7 +38,7 @@ say "\n\nPartitioned List:"; while ($dnlink->iter) { my $i = $dnlink->value; print $i; - print " -> " if $dnlink->next + print " → " if $dnlink->next } @@ -78,7 +78,7 @@ sub next { return $iter_item->{next}; } sub iter { - my ($self, $join_mode) = @_; + my $self = shift; if (!$iter_item) { $iter_item = $self; @@ -97,4 +97,21 @@ sub join { $self->add($i) } } -1; \ No newline at end of file +1; + +=begin +Original List: +1 → 4 → 3 → 2 → 5 → 2 + +Partitioned List: +1 → 2 → 2 → 4 → 3 → 5 + +The setting below was added in VS code internal terminal (PowerShell) +to properly show the arrow ( → ) character: + + "terminal.integrated.shellArgs.windows": [ + "-NoExit", + "/c", + "chcp.com 65001" + ], +=cut \ No newline at end of file -- cgit