aboutsummaryrefslogtreecommitdiff
path: root/challenge-273/sgreen/perl/ch-2.pl
blob: 59a0624a8f559997d0ae17c17c9cbf4814b22a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env perl

use strict;
use warnings;
use feature 'say';
use experimental 'signatures';

sub main ($str) {
    # Check that no 'a' is after the first 'b'
    say $str =~ /^[^b]*b[^a]*$/ ? 'true' : 'false';
}

main(@ARGV);