|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re^4: Nested Data Structures, OOPby programmer.perl (Sexton) |
| on Jul 24, 2012 at 14:30 UTC ( #983429=note: print w/ replies, xml ) | Need Help?? |
|
Hi Ken, The grep function helped me to delete the elements of an array. In my book (Perl by Example 4th edit.) there is no format of grep function, which you show me: @x = grep { $_ ne q{b} } @x;In the book, there is only one format: grep(EXPR,LIST). I used your format and it is working :-). Both calls: with single or multiple arguments are working:
Here is the final script of a sub: Thank you, Ken!
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||