-/* $Header: doio.c,v 3.0.1.6 90/03/12 16:30:07 lwall Locked $
+/* $Header: doio.c,v 3.0.1.7 90/03/14 12:26:24 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: doio.c,v $
+ * Revision 3.0.1.7 90/03/14 12:26:24 lwall
+ * patch15: commands involving execs could cause malloc arena corruption
+ *
* Revision 3.0.1.6 90/03/12 16:30:07 lwall
* patch13: system 'FOO=bar command' didn't invoke sh as it should
*
/* see if there are shell metacharacters in it */
+ for (s = cmd; *s && isalpha(*s); s++) ; /* catch VAR=val gizmo */
+ if (*s == '=')
+ goto doshell;
for (s = cmd; *s; s++) {
if (*s != ' ' && !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
if (*s == '\n' && !s[1]) {
return FALSE;
}
}
- for (s = cmd; *s && isalpha(*s); s++) ; /* catch VAR=val gizmo */
- if (*s == '=')
- goto doshell;
New(402,argv, (s - cmd) / 2 + 2, char*);
a = argv;
-;# $Header: termcap.pl,v 3.0.1.1 90/02/28 17:46:44 lwall Locked $
+;# $Header: termcap.pl,v 3.0.1.2 90/03/14 12:28:28 lwall Locked $
;#
;# Usage:
;# do 'ioctl.pl';
s/\\f/\f/g;
s/\\\^/\377/g;
s/\^\?/\177/g;
- s/\^(.)/pack('c',$1 & 31)/eg;
+ s/\^(.)/pack('c',ord($1) & 31)/eg;
s/\\(.)/$1/g;
s/\377/^/g;
$TC{$entry} = $_ if $TC{$entry} eq '';
-#define PATCHLEVEL 14
+#define PATCHLEVEL 15
''' Beginning of part 4
-''' $Header: perl.man.4,v 3.0.1.6 90/03/12 16:54:04 lwall Locked $
+''' $Header: perl.man.4,v 3.0.1.7 90/03/14 12:29:50 lwall Locked $
'''
''' $Log: perl.man.4,v $
+''' Revision 3.0.1.7 90/03/14 12:29:50 lwall
+''' patch15: man page falsely states that you can't subscript array values
+'''
''' Revision 3.0.1.6 90/03/12 16:54:04 lwall
''' patch13: improved documentation of *name
'''
The \*(L"system\*(R" calls link, unlink, rename, etc. return nonzero for success, not 0.
.Ip * 4 2
Signal handlers deal with signal names, not numbers.
-.Ip * 4 2
-You can't subscript array values, only arrays (no $x = (1,2,3)[2];).
.PP
Seasoned
.I sed
#!./perl
-# $Header: op.sleep,v 3.0 89/10/18 15:31:15 lwall Locked $
+# $Header: op.sleep,v 3.0.1.1 90/03/14 12:31:39 lwall Locked $
print "1..1\n";
$x = sleep 2;
-if ($x == 2) {print "ok 1\n";} else {print "not ok 1\n";}
+if ($x >= 2 && $x <= 10) {print "ok 1\n";} else {print "not ok 1 $x\n";}