note
ELISHEVA
<p>I think you may be confusing the command line grep with Perl's [doc://grep] command. <c>my @selected = grep { $_ ne "." } @some_array</c> selects elements based on whether the content of <c>{....}</c> returns true or false. As <c>{ $_ ne "."}</c> is only true on an exact non-match with <c>"."</c>, it will exclude only ".".</p>
<p>".foobar", "foo.bar", etc. will pass the test, i.e. <c>{ $_ ne "."}</c> will be true, and therefore will be in <c>@selected</c>.</p>
894401
894407