Thread code
(8 answers)
Opened by pq at 2010-02-05 18:34
1 zeile perl:
Code (perl): (dl
)
lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala
2 zeilen code: Code: (dl
)
1 1 lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala lalala perl-code: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 use strict; use warnings; my %colors; while(<DATA>) { next unless($_=~/^\s*(\w+)\s*=\s*(.+)\s*$/); $colors{lc($1)}=$2; } my $name=shift(@ARGV); if($name && $colors{lc($name)}) { print $colors{lc($name)}."\n"; } else { print "$_ = $colors{$_}\n" for(sort keys(%colors)); } Last edited: 2011-06-19 15:46:39 +0200 (CEST) insert sig here
|