2 ## Copyright (C) 2023 by jrmu <jrmu@ircnow.org>
4 ## Permission is granted to use, copy, modify, and/or distribute
5 ## this work for any purpose with or without fee. This work is
6 ## offered as-is, with absolutely no warranty whatsoever. The
7 ## author is not responsible for any damages that result from
10 # Make a pattern that will match three consecutive copies of whatever is
11 # currently contained in $what. That is, if $what is fred, your pattern
12 # should match fredfredfred. If $what is fred|barney, your pattern should
13 # match fredfredbarney or barneyfredfred or barneybarneybarney or many other
14 # variations. (Hint: you should set $what at the top of the pattern test
15 # program with a statement like my $what = 'fred|barney';.)
21 my $what = "fred|barney";
26 print ("Match: $_\n");
28 print ("Not matched: $_\n");