Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by tqlam

  1. tqlam

    Search Question in a text file and print Answers

    It's for work, but I'm new to the perl world.
  2. tqlam

    Search Question in a text file and print Answers

    my $FAQ = "FAQ.log"; my $query = $ARGV[0]; unless (open(DBFILE, "$FAQ")) { print "ERROR: Cannot open the System Test FAQ exit 1; } my @DB = <DBFILE>; close (DBFILE); foreach my $line (@DB) { if ($line =~ /\AQ_/ && $line =~ /$query/) { print $line; # I need to print the...
  3. tqlam

    Search Question in a text file and print Answers

    I have a text file with Questions and Answers in below. I wrote something in perl to search a question(s), if match Q's, then print Answers up to End_Q#. Can someone here help me in printing output? Example: User search for "How to dot this" Then it returns: 1. do this 2. do that 3. and do that...

Part and Inventory Search

Back
Top