#!/usr/bin/perl use strict; use warnings; my @words = qw(Camel Perl Book); for my $phrase_length (1..@words) { for my $start_idx (0..(@words-$phrase_length)) { print "@words[$start_idx .. ($start_idx + ($phrase_length - 1))]\n +"; } }
In reply to Re: Subphrases from a phrase
by AReed
in thread Subphrases from a phrase
by themage
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |