use warnings; use strict; $_ = '1: A silly sentence (495,a) *BUT* one which will be useful. (3)'; my $pattern = ; #### if (/$pattern/){ #### print "words $pattern\n"; print "\$1 morewords\n"; print "\$2 morewords\n"; print "\$seewhereimgoing\n"; } #### if /$pattern/{ print "$$i\n"; $i++; } #### $_ = '1: A silly sentence (495,a) *BUT* one which will be useful. (3)'; print "Enter a regular expression: "; my $pattern = ; chomp $pattern; if (my @matches = /$pattern/) { for my $i (0..@-) { print "$i: $matches[$i]\n"; } } #### Enter a regular expression: ([a-z]+?)(.*?)([a-z]+?) 0: s 1: 2: i Use of unitialized value in concatenation (.) or string at exp3.pl line 14, line 1. 3. Use of unitialized value in concatenation (.) or string at exp3.pl line 14, line 1. 4: