diff options
author | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:53:03 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:53:03 +0000 |
commit | 7c0587c85ff56c1fa1d95bc5228a7aff2da43d6c (patch) | |
tree | 89ac53b3686082f0fd8568003b57256f097f9165 /lib/termcap.pl | |
parent | 2b69d0c297460bce3a8d8eefe2bd0de0a6451872 (diff) | |
download | perl-7c0587c85ff56c1fa1d95bc5228a7aff2da43d6c.tar.gz |
perl 4.0 patch 32: patch #20, continued
See patch #20.
Diffstat (limited to 'lib/termcap.pl')
-rw-r--r-- | lib/termcap.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/termcap.pl b/lib/termcap.pl index 46ac858247..aa221dfc39 100644 --- a/lib/termcap.pl +++ b/lib/termcap.pl @@ -1,4 +1,4 @@ -;# $Header: termcap.pl,v 4.0 91/03/20 01:26:33 lwall Locked $ +;# $RCSfile: termcap.pl,v $$Revision: 4.0.1.1 $$Date: 92/06/08 13:49:17 $ ;# ;# Usage: ;# require 'ioctl.pl'; @@ -21,7 +21,7 @@ sub Tgetent { $TERMCAP = $ENV{'TERMCAP'}; $TERMCAP = '/etc/termcap' unless $TERMCAP; if ($TERMCAP !~ m:^/:) { - if (index($TERMCAP,"|$TERM|") < $[) { + if ($TERMCAP !~ /(^|\|)$TERM[:\|]/) { $TERMCAP = '/etc/termcap'; } } @@ -33,7 +33,7 @@ sub Tgetent { while (<TERMCAP>) { next if /^#/; next if /^\t/; - if (/\\|$TERM[:\\|]/) { + if (/(^|\\|)$TERM[:\\|]/) { chop; while (chop eq '\\\\') { \$_ .= <TERMCAP>; |