refr
asked on
Limiting An Array
How Can I Limit An Array To The First 5 Elements?
Make This Array: @a(1,2,3,4,5,6,7)
This Array @a(1,2,3,4,5)
Make This Array: @a(1,2,3,4,5,6,7)
This Array @a(1,2,3,4,5)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Adjusted points to 75
@b=@a[-5..-1];
@b=splice(@a,-5); #if you want to remove those elements from @a
@b=splice(@a,-5); #if you want to remove those elements from @a
ASKER
Great.
Txs
otto
Txs
otto
ASKER
I Need To Make An Array Using Only The Last 5 Elements Of @a.