
davorg
Thaumaturge
/ Moderator
Sep 21, 2003, 1:26 AM
Post #3 of 3
(371 views)
|
|
Re: [andy7t] Removing From Array
[In reply to]
|
Can't Post
|
|
Your code doesn't remove the element from the array, it sets the element to the empty string. KevinR's sets the element to the value "undef" (almost, but not quite, the same thing). If you really want to remove the element from the array, then use "grep".
@array = grep { ! (some condition) } @array; -- Dave Cross, Perl Hacker, Trainer and Writer http://www.dave.org.uk/ Get more help at Perl Monks
|