Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Removing certain lines from array

by Loops (Curate)
on Jul 30, 2013 at 12:24 UTC ( #1047003=note: print w/replies, xml ) Need Help??


in reply to Re: Removing certain lines from array
in thread Removing certain lines from array

You should turn warnings on and rerun this script.

Iterating over the array in reverse will avoid the problem of the loop indices needing adjustment after an element is deleted.

Update: You changed the script while I was replying. Your description doesn't match now, although I suspect it will in a moment. ;o)

  • Comment on Re^2: Removing certain lines from array

Replies are listed 'Best First'.
Re^3: Removing certain lines from array
by VGavara (Novice) on Jul 30, 2013 at 12:33 UTC

    Sorry Loops, I made some changes before reading your comment. In fact the original script didn't work and I think your comment is not suitable for the new one. Sorry again, newbie behind the wheel :/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1047003]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-09-25 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?