Re: Alternative to while ()

2010-09-29 Thread Uri Guttman
> "OC" == Owen Chavez writes: OC> while () { OC> if ($input = 'this') { OC> # Do some things. OC> last; OC> } OC> elsif ($input = 'that') { OC> # Do some other things. OC>last; OC> } OC> else { OC>

Alternative to while ()

2010-09-29 Thread Owen Chavez
Hey y'all, I suspect that I'm struggling with something that has a *really* straightforward alternative, but I don't do a lot of programming in perl (or any other language, really), and I can't see it. I've got a block of code that I'd like to run in a loop until a user enters some desired input.

Re: How to get the Pause ID

2010-09-29 Thread Jeff Pang
2010/9/30 Parag Kalra : > Hi All, > > I have been trying to get Pause ID but seems like either the request is > getting rejected or something is wrong in the way I am raising the request. > Please send the message to the CPAN related mailing lists. http://lists.perl.org/all.html -- To unsubscrib

How to get the Pause ID

2010-09-29 Thread Parag Kalra
Hi All, I have been trying to get Pause ID but seems like either the request is getting rejected or something is wrong in the way I am raising the request. I have applied twice in past. EG: http://www.nntp.perl.org/group/perl.modules/2010/09/msg72805.html Could someone please share some pointer

Re: How to remove duplicates from a hash

2010-09-29 Thread Richard Green
These are great suggestions thanks everyone! -Rich On Sep 29, 2010, at 2:39 AM, Paul Johnson wrote: > On Tue, Sep 28, 2010 at 08:10:30AM -0700, Richard Green wrote: > >> What would be the quickest , easiest way to remove duplicates from a hash? >> Any suggestions are muchly appreciated. Thank

Re: How to remove duplicates from a hash

2010-09-29 Thread Shlomi Fish
Hi Rich, On Tuesday 28 September 2010 17:10:30 Richard Green wrote: > What would be the quickest , easiest way to remove duplicates from a hash? > Any suggestions are muchly appreciated. Thanks > -Rich What do you mean by "duplicates from a hash"? A hash cannot have duplicate keys. If you do: $

Re: How to remove duplicates from a hash

2010-09-29 Thread Paul Johnson
On Tue, Sep 28, 2010 at 08:10:30AM -0700, Richard Green wrote: > What would be the quickest , easiest way to remove duplicates from a hash? > Any suggestions are muchly appreciated. Thanks I presume you mean duplicate values, because hashes don't have duplicate keys. Do you care which values get

Re: How to remove duplicates from a hash

2010-09-29 Thread John W. Krahn
Richard Green wrote: What would be the quickest , easiest way to remove duplicates from a hash? Any suggestions are muchly appreciated. Thanks I assume you mean duplicate values because all keys are unique. $ perl -le' use Data::Dumper; my %hash = qw/ a z b z c x d x e y f g h i /; print Du

How to remove duplicates from a hash

2010-09-29 Thread Richard Green
What would be the quickest , easiest way to remove duplicates from a hash? Any suggestions are muchly appreciated. Thanks -Rich -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/