in reply to Re: repeating patterns 2
in thread repeating patterns 2

and as is being mentioned in the chatterbox, foo may not be present within the item :
for (@foostuffs) { s/^foo// }
should then be
for (@foostuffs) { s/^foo// unless (/foo/) {process data here} }
but I don't think that was mentioned above.