summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-20 14:38:03 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-20 14:38:03 -0500
commit5fc583b350af332078d6dc3a2c42906f97fdde13 (patch)
tree286fe97deb7fada405cd33b4ef9f452cd14a75ea
parentb4c33892ca44436dd5a5fc711016f5019af5cfea (diff)
downloadrosalind-5fc583b350af332078d6dc3a2c42906f97fdde13.tar.gz
rosalind-5fc583b350af332078d6dc3a2c42906f97fdde13.zip
another solution
-rw-r--r--SSEQ.pl10
1 files changed, 10 insertions, 0 deletions
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..$#-]);