Re: how do I shorten this code

2008-03-11 Thread itshardtogetone
Thank You very much everyone here. Thanks for providing me leads to study. - Original Message - "John W. Krahn" <[EMAIL PROTECTED]>, Rodrick Brown wrote: "Tom Phoenix" < Gunnar Hjalmarsson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how do I shorten this code

2008-03-11 Thread John W. Krahn
Rodrick Brown wrote: On Tue, Mar 11, 2008 at 2:46 PM, Rodrick Brown <[EMAIL PROTECTED]> wrote: On Tue, Mar 11, 2008 at 2:23 PM, <[EMAIL PROTECTED]> wrote: How do I shorten this code:- if $playercard1 = 10 or $playercard1 = "J" or $playercard1 = "Q" or $playercard1 = "K"; print "Player has

Re: how do I shorten this code

2008-03-11 Thread Tom Phoenix
On Tue, Mar 11, 2008 at 11:23 AM, <[EMAIL PROTECTED]> wrote: > How do I shorten this code:- > > if $playercard1 = 10 or $playercard1 = "J" or $playercard1 = "Q" or > $playercard1 = "K"; Here's my version of a program that does the same thing as yours. It's got some advantages over yours, but i

Re: how do I shorten this code

2008-03-11 Thread Rodrick Brown
On Tue, Mar 11, 2008 at 2:46 PM, Rodrick Brown <[EMAIL PROTECTED]> wrote: > > On Tue, Mar 11, 2008 at 2:23 PM, <[EMAIL PROTECTED]> wrote: > > Hi, > > How do I shorten this code:- > > > > if $playercard1 = 10 or $playercard1 = "J" or $playercard1 = "Q" or > > $playercard1 = "K"; > > > > Thanks > >

Re: how do I shorten this code

2008-03-11 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: How do I shorten this code:- if $playercard1 = 10 or $playercard1 = "J" or $playercard1 = "Q" or $playercard1 = "K"; That code does not compile. Besides that it would not do what you think it would. You probably want something like: if ( grep $_ eq $playercard

Re: how do I shorten this code

2008-03-11 Thread Rodrick Brown
On Tue, Mar 11, 2008 at 2:23 PM, <[EMAIL PROTECTED]> wrote: > Hi, > How do I shorten this code:- > > if $playercard1 = 10 or $playercard1 = "J" or $playercard1 = "Q" or > $playercard1 = "K"; > > Thanks > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL

Re: how do I shorten this code

2008-03-11 Thread itshardtogetone
Hi, How do I shorten this code:- if $playercard1 = 10 or $playercard1 = "J" or $playercard1 = "Q" or $playercard1 = "K"; Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/