http://www.perlmonks.org?node_id=1075044


in reply to I think regex Should Help Here... but How!?

As you're only trying to match the beginning of a string with no wildcards using index seems like a simpler approach.

foreach (@items) { say "$_ match" if index($_,$master) == 0; }