I am passing some undefined no. of arrays to the subroutine in perl I want to get these individual arrays in the subroutine and so I can run loop. But as i was unable so I tried passing the count of arrays. But as we can remove individual elements from an array using shift can we do same with array i.e. is there some function similar to Shift for array.
sub iFrame
{
my $count=shift @_;
for (my $i=1;$i<=$count;$i++)
{
my @iFrame =@_; #need to remove this @iFrame each time
print qq[<iframe src="$iFrame[0]" width="$iFrame[1]"
height="$iFrame[2]" frameborder="$iFrame[3]" name="$iFrame[4]"></iframe>];
# and some other code
}
A better solution would be if I am able to do the same without passing the $count of arrays.