C:\Users\Administrator>perl -E"my @bb = 1..10; for(keys @bb[1..5]){say;} Experimental keys on scalar is now forbidden at -e line 1. Type of arg 1 to keys must be hash or array (not array slice) at -e line 1, near "])" Execution of -e aborted due to compilation errors. C:\Users\Administrator>perl -E"my @bb = 1..10; @cc = @bb[1..5]; for(keys @cc){say;} 0 1 2 3 4