How to add one element at the beginning of the array?

It’s as follows :

 


@coins = ("Quarter","Dime","Nickel");
unshift(@coins, "Dollar");

O/p

3. @coins = Dollar Quarter Dime Nickel

Leave a Reply