Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Best way to remove elem of for loop

by InfiniteSilence (Curate)
on Apr 24, 2014 at 14:44 UTC ( [id://1083617]=note: print w/replies, xml ) Need Help??


in reply to Best way to remove elem of for loop

You method does not remove the total number of elements in the array which can potentially cause problems in the future:

... #assume @ar is filled with this stuff __END__ /tmp /var /etc /nonexistent /home /nonexistent
DB<5> p Dumper \@ar $VAR1 = [ '/tmp', '/var', '/etc', '', '/home', '' ];

Celebrate Intellectual Diversity

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found