use v5.10;
 
@texts=split /\n/,
'Oh, welcome to Perl!
This is my small program!
Which does nothing good.
At all...
OK, maybe something.
Do you want to know what is its purpose?';
 
for(@texts){say if /[!?]/}