my @step=(1..9); push (@step, 0); my $step; foreach (@step) { $step . $_; } print ($step x 7); #### my @step=(1..9); push (@step, 0); my @stepCount=(1..7); foreach (@stepCount) { print @step; } #### my $what = "fred|barney"; while (<>) { chomp; if ($_ =~ ($what){3}) { print "It's in there.\n"; } else { print "Not there.\n"; } } #### my $what = "(fred|barney){3}"; while (<>) { chomp; if ($_ =~ $what) { print "It's in there.\n"; } else { print "Not there.\n"; } }