in reply to pattern matching through a whole document

put the regex and processing in a while loop. I.e.
while($source =~ m!(\d{1,2})(\/|\-)(\d{1,2})(\/|\-)(\d{2,4})!g) { my $day = $1; my $month = $3; my $year = $5; # process stuff print $query->p({-align=>center},"$day $month $year"), }
Note:
1 unless you know there are no confusing spaces in your dates you may wish to have the middle expressions as \s*(\/|\-)\s*
2 if you use the (?: ) syntax you will not $2 and $4 defined. Then you can do while(($day,$month,$year) =(source=~ /.../g) ) { and assign the values as you test the RE.

Combining my notes would give you a while line

while(($day,$month,$year) = ($source =~ m!(\d{1,2})\s*(?:\/|\-)(\d{1,2})\s*\s*(?:\s*(?:\/|\-)\s* +(\d{2,4})!g) ){
which may or may not be easier to understand.