princepawn has asked for the wisdom of the Perl Monks concerning the following question:
#!/Users/metaperl/install/bin/perl use strict; my $file = shift or die 'must supply file'; my ($white,$black) = split '-', $file; my $color; if ($white =~ /princepawn/) { $color = 'w'; } else { $color = 'b'; } my @cmd = ('annotateh', $file, $color, qw(1-999 1 5)); warn "@cmd"; system @cmd;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How would you shorten this regexp conditional?
by japhy (Canon) on Jan 25, 2002 at 17:23 UTC | |
by merlyn (Sage) on Jan 25, 2002 at 18:58 UTC | |
by japhy (Canon) on Jan 25, 2002 at 19:07 UTC | |
by merlyn (Sage) on Jan 25, 2002 at 19:10 UTC | |
|
Re: How would you shorten this regexp conditional?
by petral (Curate) on Jan 25, 2002 at 23:32 UTC |