summaryrefslogtreecommitdiff
path: root/t/op.each
diff options
context:
space:
mode:
authorLarry Wall <larry@wall.org>1989-10-18 00:00:00 +0000
committerLarry Wall <larry@wall.org>1989-10-18 00:00:00 +0000
commita687059cbaf2c6fdccb5e0fae2aee80ec15625a8 (patch)
tree674c8533b7bd942204f23782934c72f8624dd308 /t/op.each
parent13281fa4f8547e0eb31d1986b865d9b7ec7d0dcc (diff)
downloadperl-a687059cbaf2c6fdccb5e0fae2aee80ec15625a8.tar.gz
perl 3.0: (no announcement message available)perl-3.000
A few of the new features: (18 Oct) * Perl can now handle binary data correctly and has functions to pack and unpack binary structures into arrays or lists. You can now do arbitrary ioctl functions. * You can now pass things to subroutines by reference. * Debugger enhancements. * An array or associative array may now appear in a local() list. * Array values may now be interpolated into strings. * Subroutine names are now distinguished by prefixing with &. You can call subroutines without using do, and without passing any argument list at all. * You can use the new -u switch to cause perl to dump core so that you can run undump and produce a binary executable image. Alternately you can use the "dump" operator after initializing any variables and such. * You can now chop lists. * Perl now uses /bin/csh to do filename globbing, if available. This means that filenames with spaces or other strangenesses work right. * New functions: mkdir and rmdir, getppid, getpgrp and setpgrp, getpriority and setpriority, chroot, ioctl and fcntl, flock, readlink, lstat, rindex, pack and unpack, read, warn, dbmopen and dbmclose, dump, reverse, defined, undef.
Diffstat (limited to 't/op.each')
-rw-r--r--t/op.each12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/op.each b/t/op.each
index 5a445ed5d6..edaed11e78 100644
--- a/t/op.each
+++ b/t/op.each
@@ -1,13 +1,13 @@
#!./perl
-# $Header: op.each,v 2.0 88/06/05 00:13:38 root Exp $
+# $Header: op.each,v 3.0 89/10/18 15:28:48 lwall Locked $
print "1..3\n";
$h{'abc'} = 'ABC';
$h{'def'} = 'DEF';
-$h{'jkl'} = 'JKL';
-$h{'xyz'} = 'XYZ';
+$h{'jkl','mno'} = "JKL\034MNO";
+$h{'a',2,3,4,5} = join("\034",'A',2,3,4,5);
$h{'a'} = 'A';
$h{'b'} = 'B';
$h{'c'} = 'C';
@@ -35,8 +35,8 @@ $h{'x'} = 'X';
$h{'y'} = 'Y';
$h{'z'} = 'Z';
-@keys = keys(h);
-@values = values(h);
+@keys = keys %h;
+@values = values %h;
if ($#keys == 29 && $#values == 29) {print "ok 1\n";} else {print "not ok 1\n";}
@@ -49,5 +49,5 @@ while (($key,$value) = each(h)) {
if ($i == 30) {print "ok 2\n";} else {print "not ok 2\n";}
-@keys = ('blurfl', keys(h), 'dyick');
+@keys = ('blurfl', keys(%h), 'dyick');
if ($#keys == 31) {print "ok 3\n";} else {print "not ok 3\n";}