Re: how do I shorten this code

2008-03-24 Thread yitzle
On Mon, Mar 24, 2008 at 9:00 AM, <[EMAIL PROTECTED]> wrote: > Hi , > Looking at the reg expression ( $playercard1 =~ /10|J|Q|K/ ), > it will match 0, 1, and '10' , J, Q, K > > What must I do so that it will match only '10' , 'J', 'Q', and 'K' > > Thanks /10|J|Q|K/ will not match 0 or 1 alone.

Re: how do I shorten this code

2008-03-24 Thread itshardtogetone
Hi , Looking at the reg expression ( $playercard1 =~ /10|J|Q|K/ ), it will match 0, 1, and '10' , J, Q, K What must I do so that it will match only '10' , 'J', 'Q', and 'K' Thanks - Original Message - From: "Rodrick Brown" <[EMAIL PROTECTED]> #!/usr/bin/perl -w use strict; use war

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 $player

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 thi

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 $playerc

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 someth

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

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/

Re: how do I shorten this code

2008-03-09 Thread Chas. Owens
On Sun, Mar 9, 2008 at 12:23 PM, <[EMAIL PROTECTED]> wrote: > Hi, > I wish to shuffle 8 decks of cards, so how do I shorten this code :- > > use Algorithm::Numerical::Shuffle qw /shuffle/; > @eightdecks = shuffle > (1..10,"J","Q","K",1..1

how do I shorten this code

2008-03-09 Thread itshardtogetone
Hi, I wish to shuffle 8 decks of cards, so how do I shorten this code :- use Algorithm::Numerical::Shuffle qw /shuffle/; @eightdecks = shuffle (1..10,"J","Q","K",1..10,"J","Q","K",1..10,"J","Q","K");#how do I repeat 1 to K 32 times print @eightdecks ;