in reply to Re^6: Perl vs C
in thread Perl vs C
#!usr/bin/perl -w use warnings; my @list = ("a1", "b23", "c45", "d1", "b43", "b65"); print join (" ",@list),"\n"; #prints: a1 b23 c45 d1 b43 b65 @list = grep{!/^b/}@list; #remove things that start with b print join (" ",@list),"\n"; #prints: a1 c45 d1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Perl vs C
by JavaFan (Canon) on Mar 16, 2009 at 14:23 UTC | |
by Marshall (Canon) on Mar 16, 2009 at 15:00 UTC | |
by ikegami (Patriarch) on Mar 16, 2009 at 15:34 UTC | |
by Marshall (Canon) on Mar 16, 2009 at 15:58 UTC | |
by ikegami (Patriarch) on Mar 16, 2009 at 16:17 UTC | |
| |
by chromatic (Archbishop) on Mar 16, 2009 at 18:13 UTC |