Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions challenge-316/matt-martini/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Solutions by Matt Martini
23 changes: 23 additions & 0 deletions challenge-316/matt-martini/perl/ch-2.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env perl

use strict;
use warnings;

# my $str1 = "uvw";
# my $str2 = "bcudvew";

# my $str1 = "aec";
# my $str2 = "abcde";

my $str1 = "sip";
my $str2 = "javascript";

my $str1_prere = join( '.*', unpack( "(a)*", $str1 ) );
my $str1_re = qr<$str1_prere>;

if ( $str2 =~ $str1_re ) {
print "true\n";
}
else {
print "false\n";
}