P.S. note a wrong rotation direction. So, the pattern should be reversed before, if it's not a palindrome.#!/usr/bin/perl # https://perlmonks.org/?node_id=1227147 use warnings; use strict; my $short_pattern = 'FTTF'; my @result = grep { $short_pattern = ( chop $short_pattern ) . $short_patt +ern; $short_pattern ge 'T' } 0 .. 12; print "@result\n";
In reply to Re: Grep Pattern
by rsFalse
in thread Grep Pattern
by GotToBTru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |