From 5fc583b350af332078d6dc3a2c42906f97fdde13 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 20 Oct 2012 14:38:03 -0500 Subject: another solution --- SSEQ.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 SSEQ.pl diff --git a/SSEQ.pl b/SSEQ.pl new file mode 100644 index 0000000..2f8feb8 --- /dev/null +++ b/SSEQ.pl @@ -0,0 +1,10 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.016; + +chomp(my $string = <>); +chomp(my $substr = <>); +$substr = '(' . join(').*?(', split '', $substr) . ')'; +$string =~ $substr; +say join(' ', map { $_ + 1 } @-[1..$#-]); -- cgit v1.2.3