Andy,<br><br>Thanks so much for the response. Your suggestion was vert elegant and efficient.<br><br>Thanks again,<br><br>Richard<br><br><b><i>Andy Lester <andy@petdance.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>On Aug 1, 2007, at 8:56 AM, Richard Reina wrote:<br><br>> foreach $def (@arr) {<br>> if ($def eq "b") {<br>> my $trash = shift # get rid of (trash) b<br>> }<br>> }<br>><br>> print "@arr\n";<br>><br>> "b" does not get eliminated?<br><br>Because you're shifting from @ARGV, not @arr.<br><br>The better way to do it is to replace the entire for loop with:<br><br> @arr = grep { $_ ne 'b' } @arr;<br><br>xoxo,<br>Andy<br><br>--<br>Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance<br><br><br><br><br>_______________________________________________<br>Chicago-talk mailing
list<br>Chicago-talk@pm.org<br>http://mail.pm.org/mailman/listinfo/chicago-talk<br></blockquote><br><BR><BR>Your beliefs become your thoughts. Your thoughts become your words. Your words become your actions. Your actions become your habits. Your habits become your values. Your values become your destiny. -- Mahatma Gandhi