|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T c
Length: 550 (0x226) Types: TextFile Names: »chop.t«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦b5330643c⟧ »./cops/perl-4.019/perl.tar.Z« └─⟦2b9a58213⟧ └─⟦this⟧ »perl-4.019/t/op/chop.t«
#!./perl # $Header: chop.t,v 4.0 91/03/20 01:51:42 lwall Locked $ print "1..4\n"; # optimized $_ = 'abc'; $c = do foo(); if ($c . $_ eq 'cab') {print "ok 1\n";} else {print "not ok 1 $c$_\n";} # unoptimized $_ = 'abc'; $c = chop($_); if ($c . $_ eq 'cab') {print "ok 2\n";} else {print "not ok 2\n";} sub foo { chop; } @foo = ("hi \n","there\n","!\n"); @bar = @foo; chop(@bar); print join('',@bar) eq 'hi there!' ? "ok 3\n" : "not ok 3\n"; $foo = "\n"; chop($foo,@foo); print join('',$foo,@foo) eq 'hi there!' ? "ok 4\n" : "not ok 4\n";