#!/usr/local/bin/perl -w use strict; $|++; my @numlist; push @numlist, int(rand 100000) for 1..10; for(@numlist) { next if /^$/; /.*?([0-9]).*?\1/ ? print "$_\tmultiple $1\n" : print "$_\tsingle\n"; } #### Use of uninitialized value in concatenation (.) or string at test_match1.pl line 10. Nested quantifiers before HERE mark in regex m/.*?([0-9]).*?+ << HERE / at test_match1.pl line 10.