##
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";
}
}