cygwin port
[p5sagit/p5-mst-13.2.git] / utils / perldoc.PL
index 760a0ce..7147607 100644 (file)
@@ -56,7 +56,7 @@ Usage: $me [-h] [-r] [-i] [-v] [-t] [-u] [-m] [-n program] [-l] [-F] [-X] PageNa
        $me -q FAQKeywords
 
 The -h option prints more help.  Also try "perldoc perldoc" to get
-aquainted with the system.
+acquainted with the system.
 EOF
 }
 
@@ -559,6 +559,13 @@ if ($opt_q) {
     local @ARGV = @found;      # I'm lazy, sue me.
     my $found = 0;
     my %found_in;
+    my $rx = eval { qr/$opt_q/ };
+    die <<EOD unless $rx;
+Invalid regular expression '$opt_q' given as -q pattern:
+  $@
+Did you mean \\Q$opt_q ?
+
+EOD
 
     while (<>) {
        if (/^=head2\s+.*(?:$opt_q)/oi) {
@@ -721,10 +728,10 @@ and others.
 #       Robin Barker <rmb1@cise.npl.co.uk>
 #      -strict, -w cleanups
 # Version 1.13: Fri Feb 27 16:20:50 EST 1997
-#       Gurusamy Sarathy <gsar@umich.edu>
+#       Gurusamy Sarathy <gsar@activestate.com>
 #      -doc tweaks for -F and -X options
 # Version 1.12: Sat Apr 12 22:41:09 EST 1997
-#       Gurusamy Sarathy <gsar@umich.edu>
+#       Gurusamy Sarathy <gsar@activestate.com>
 #      -various fixes for win32
 # Version 1.11: Tue Dec 26 09:54:33 EST 1995
 #       Kenneth Albanowski <kjahds@kjahds.com>