shift

Synopsis

$ shift(@array)

Removes the first element from @array and returns it.

Parameters

@array - the array to "shift" a value from.

Returns

The scalar removed from the specified array.

Side Effects / Notes

Examples

@queue = @("bottom", "middle", "top"); $bottom = shift(@queue); println($bottom); println("Queue is: " . @queue);

bottom Queue is: @('middle', 'top')

See Also