diff options
| -rwxr-xr-x | challenge-151/alexander-pankoff/perl/ch-1.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/challenge-151/alexander-pankoff/perl/ch-1.pl b/challenge-151/alexander-pankoff/perl/ch-1.pl index 7f6d3de5da..a0b3efc07e 100755 --- a/challenge-151/alexander-pankoff/perl/ch-1.pl +++ b/challenge-151/alexander-pankoff/perl/ch-1.pl @@ -61,7 +61,7 @@ sub minimum_binary_tree_depth ( @tokens) { my $num_elems = 2**$depth; for ( my $i = 0 ; $i < $num_elems ; $i++ ) { - if ( !@tokens || $tokens[0]->isa('SeperatorToken') ) { + if ( !@tokens || $tokens[0]->isa('SeparatorToken') ) { ## fill row with dummy placeholder tokens. unshift @tokens, map { PlaceHolderToken->new(-1) } @@ -94,8 +94,8 @@ sub minimum_binary_tree_depth ( @tokens) { $depth += 1; - # handle optional seperatortoken - if ( @tokens && $tokens[0]->isa("SeperatorToken") ) { + # handle optional separatortoken + if ( @tokens && $tokens[0]->isa("SeparatorToken") ) { shift @tokens; } } @@ -110,7 +110,7 @@ sub tokenize ( $input) { my $cur = substr( $input, $pos, 1 ); if ( $cur =~ m/\|/ ) { - push @tokens, SeperatorToken->new($pos); + push @tokens, SeparatorToken->new($pos); $pos += 1; } elsif ( $cur =~ m/\*/ ) { @@ -164,7 +164,7 @@ package PlaceHolderToken { } } -package SeperatorToken { +package SeparatorToken { use base 'TokenType'; sub new ( $class, $pos ) { |
