The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Suffix::Trie

SYNOPSIS

A module for pure Perl Suffix Trie. Core code taken from https://rosettacode.org/wiki/Suffix_tree#Perl

use strict;
use warnings;
use Data::Dumper;
use Suffix::Trie;

my $trie = Suffix::Trie->new("mississippi");
# Get all substrings into an array reference
print Dumper $trie->suffixes();
# Get the actual trie in a hash reference
print Dumper $trie->trie;