given this code:
How do I code this into an "if" statement? So... "if the grep conditions are true, print what's indicated, otherwise print a message that says, "nothing found".@array = qw(apple pear banana orange grape); @array2 = grep {$_ =~ "n"} @array; print "@array2\n";
Thanks
In reply to grep and arrays by purple.mojo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |