1N/A# $RCSfile: do.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:45 $ 1N/A # You have to do it this way or VMS will get confused. 1N/A# Test do &sub and proper @_ handling. 1N/A@x =
("jeepers", "okydoke");
1N/A@y =
("uhhuh", "yeppers");
1N/A print DO "ok(1, 'do in scalar context') if defined wantarray && not wantarray\n"; 1N/A print DO "ok(1, 'do in list context') if defined wantarray && wantarray\n"; 1N/A print DO "ok(1, 'do in void context') if not defined wantarray\n"; 1N/A# bug ID 20010920.007 1N/Aok( !$@, "do on a non-existing file, first try" );
1N/Aok( !$@, "do on a non-existing file, second try" );
1N/A# 6 must be interpreted as a file name here 1N/Apush @t,
($u = (do {} . "This should be pushed."));
1N/Aok( $#t == 0, "empty do result value" );