my @arr = (1, 2, 3); delete $arr[0]; however I have set of functions looking like this ### main ### fetch the cashflows from input file and map the values from the config file my @cfs = &fetch_cfs; ### manipulate the cashflow values @cfs = &man_cfs(\@cfs,\@valid_ports); ######################################## sub man_cfs { my ($cashflow,$valid_ports) = @_; foreach my $cf (@$cashflow) { if ($cf->{'portfolio_id'} eq "") { delete $cashflow[$count]; next; }