[EMAIL PROTECTED]: Re: Quick question on code factoring]

2006-09-11 Thread Chad Perrin
<[EMAIL PROTECTED]> Subject: Re: Quick question on code factoring On Mon, Sep 11, 2006 at 08:28:15PM -0400, Jen Spinney wrote: > > Chad - > > Thanks for the quick reply. How do I embed the "unless" inside > function call parentheses? > > I've muddled arou

Re: Quick question on code factoring

2006-09-11 Thread Chad Perrin
On Mon, Sep 11, 2006 at 05:37:15PM -0700, chen li wrote: > > What is the usage for "? () :" and where can I find > more about it? perldoc perlop -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] This sig for rent: a Signify v1.14 production from http://www.debian.org/ -- To unsubscrib

Re: Quick question on code factoring

2006-09-11 Thread chen li
> > It looks like you may want something like this: > > > > > > $id = $c->createLine( > > $x[0], $time1, > > $x[1], $time1, > > $color eq $B_COLOR ? () : ( > > $x[2], $time2, > > $x[3], $time2, > > ), > > -arrow => 'last'

Re: Quick question on code factoring

2006-09-11 Thread Jen Spinney
On 9/11/06, John W. Krahn <[EMAIL PROTECTED]> wrote: Jen Spinney wrote: > Hello. It's obvious that I need to factor the follow code, but I'm > not sure how to go about it syntax wise (I read perldoc perlsyn, but > I'm still not sure of the best way). > >if ($color eq $B_COLOR) >{ > $

Re: Quick question on code factoring

2006-09-11 Thread Jen Spinney
On 9/11/06, Chad Perrin <[EMAIL PROTECTED]> wrote: On Mon, Sep 11, 2006 at 08:02:36PM -0400, Jen Spinney wrote: > > The only difference between the blocks is two additional lines > ($x[2]...) in the else block. I mean, I know I could write a > subroutine that I could call inside the parentheses

Re: Quick question on code factoring

2006-09-11 Thread John W. Krahn
Jen Spinney wrote: > Hello. It's obvious that I need to factor the follow code, but I'm > not sure how to go about it syntax wise (I read perldoc perlsyn, but > I'm still not sure of the best way). > >if ($color eq $B_COLOR) >{ > $id = $c->createLine > ($x[0], $time1, >

Re: Quick question on code factoring

2006-09-11 Thread Chad Perrin
On Mon, Sep 11, 2006 at 08:02:36PM -0400, Jen Spinney wrote: > > The only difference between the blocks is two additional lines > ($x[2]...) in the else block. I mean, I know I could write a > subroutine that I could call inside the parentheses that would return > a string (either empty or contai

Quick question on code factoring

2006-09-11 Thread Jen Spinney
Hello. It's obvious that I need to factor the follow code, but I'm not sure how to go about it syntax wise (I read perldoc perlsyn, but I'm still not sure of the best way). if ($color eq $B_COLOR) { $id = $c->createLine ($x[0], $time1, $x[1], $time1,