qscan.pl -- Scan for Excessively Long Quoted Strings (new version)


Like 40scan.pl, this program scans a text file or program for double-quoted and single-quoted strings. If found, it reports those which are longer than a defined number of characters. The default is 40 characters, but qscan lets you define other string lengths on the command line.

Usage

Assuming this program is executable, its commandline is: qscan [-l#] [filename...]
where:

An example run is shown below.

> qscan test.txt

   Page  1

   qscan: Find long quoted text
   by Kent Nassen, v1.8, 10/22/99
   Scanning for quoted text longer than 40 characters in the file '40scan_versions_test'

             Quote
   Line#     Length                   Line Contents/*** Message
  -------   --------  ----------------------------------------------------------
       51        42        7   42    v3 "This is a longer label for the varia...
       52        61        8   61    v4 "This is a very long label for the fo...

    There were 68 lines in '40scan_versions_test'
    3 lines had quoted text over 40 characters long.
    The length of the longest quoted text found was 61 characters at line 52."

Back to Kent's Perl Page

Last Modified: Tue Sep 2 20:28:31 EDT 2025