MEANINGLESS TEXT Bob is cool Bill is dumb Ted is cruel Sally wines allot Hit me on my pager 9207882332 I can't see the headlights. I'm blind now. ALTERNATIVE TEXT Turtles are faster than Bill's thought process Bill is dumb Ted is cruel Ted needs to get hit by a bus Sally should buy a muzzle Hit me on my pager 9207882332 I hate brights #### print "What number?"; chomp($var = *STDIN*); $var1 = "MEANINGLESS TEXT"; $var2 = "ALTERNATIVE TEXT"; $line3 = (However you tell PERL that this is line1 of the "MEANINGLESS TEXT" record block); $line4 = (However you tell PERL that this is line4 of the "MEANINGLESS TEXT" record block); $line5 = (However you tell PERL that this is line5 of the "ALTERNATIVE TEXT" record block); $line7 = (However you tell PERL that this is line7 of the "ALTERNATIVE TEXT" record block); open(FILE, "resultsdata"); while (*FILE*) { if (/$var/ && /$var1/) { print "$var1\n"; print "$line3\n"; print "$line4\n"; if (/$var/ && /$var2/) { print "$var2\n"; print "$line5\n"; print "$line7\n"; } } }