grep allows you to accomplish something like:
in a concise syntax. Simple filtering by a regular expression is a classic use case. If you have side effects or complex tests, then grep may be a bad choice.my @second; for my $element (@first) { push @second, $element if condition($element); }
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re^3: CGI Help
by kennethk
in thread CGI Help
by phizymonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |