Andy,<br><br>Thanks so much for the response.&nbsp; Your suggestion was vert elegant and efficient.<br><br>Thanks again,<br><br>Richard<br><br><b><i>Andy Lester &lt;andy@petdance.com&gt;</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>&gt; foreach $def (@arr) {<br>&gt;         if ($def eq "b") {<br>&gt;              my $trash = shift  # get rid of (trash) b<br>&gt;         }<br>&gt; }<br>&gt;<br>&gt; print "@arr\n";<br>&gt;<br>&gt; "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 =&gt; andy@petdance.com =&gt; www.petdance.com =&gt; 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