- Timestamp:
- 11/08/08 21:17:02 (2 months ago)
- Files:
-
- 1 modified
-
t/spec/S04-statements/for-scope.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S04-statements/for-scope.t
r22140 r22931 3 3 use Test; 4 4 5 plan 1 2;5 plan 15; 6 6 7 7 # Implicit $_ … … 43 43 is(@inside.join(""), "123", "lexical array properly initialized, round $_, two explicit \$_s"); 44 44 } 45 46 sub respect(*@a) { 47 my @b = (); 48 push @b for @a; 49 return @b.elems; 50 } 51 52 is respect(1,2,3), 3, 'a for loop inside a sub loops over each of the elements'; 53 is respect([1,2,3]), 3, '...even if they are sent as an array ref'; # is this right? 54 is respect( my @a = 1, 2, 3 ), 3, '...and when the array is declared in the argument list';
