aboutsummaryrefslogtreecommitdiff
path: root/challenge-114/lance-wicks/perl/lib/Palindrome.pm
blob: c0e9c2bfe824f8872abf296ec2c31118c1e8be64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package Palindrome;

sub num {
    my ( $self, $N ) = @_;

    my $counter = $N + 1;
    while ( $counter ne reverse $counter ) {
        $counter++;
    }
    return $counter;
}

1;