Re: reutun undef

2010-03-24 Thread Uri Guttman
> "JP" == Jeff Peng writes: "return" statement with explicit "undef" at line 185, column 9. See page 199 of PBP. (Severity: 5) JP> I got the cpan test report, it pointed out the one above. JP> Is "return undef" not to be encouraged in current Perl? this has been debated i

Re: reutun undef

2010-03-24 Thread John W. Krahn
Jeff Peng wrote: "return" statement with explicit "undef" at line 185, column 9. See page 199 of PBP. (Severity: 5) I got the cpan test report, it pointed out the one above. Is "return undef" not to be encouraged in current Perl? Only if you want to explicitly return a single scalar value

reutun undef

2010-03-24 Thread Jeff Peng
>>> "return" statement with explicit "undef" at line 185, column 9. See page >>> 199 of PBP. (Severity: 5) I got the cpan test report, it pointed out the one above. Is "return undef" not to be encouraged in current Perl? Thanks. -- Jeff Peng Email: jeffp...@netzero.net Skype: compuperson --

Re: Object Oriented

2010-03-24 Thread Randal L. Schwartz
> "Steve" == Steve Bertrand writes: Steve> Also, quite a few years ago, I found "Learning Perl Ojbects, References Steve> and Modules" by Randal Schwartz to be quite a good primer and well worth Steve> the money. The new title of that ("new" being relative here, as in for the past 4 years) i

Re: IOScalar with threads dose not work

2010-03-24 Thread iizuka
Thank you for your comment, Shlomi. > 1. There's no such thing as IOScalar. Maybe you mean writing to an in-memory > buffer. Yes, in-memory buffer. That's what I meant. > 2. Don't use threads in Perl. They cause too many problems. Is there any workaround? to make multi-thread script without 'us

Re: Object Oriented

2010-03-24 Thread Shlomi Fish
On Wednesday 24 Mar 2010 14:42:32 Pry, Jeffrey wrote: > Damon, > > Thanks for such a quick reply. I recently started an internship and am > seeing how learning Perl would be a valuable part of my toolset. I am new > to OOP (having had some previous Java training) and would like to start > out on t

Re: Deleting last 10 lines of a file

2010-03-24 Thread sheela b
Thanks a lot Shlomi and Thomas. I will try with these methods. On Tue, Mar 23, 2010 at 7:13 PM, Shlomi Fish wrote: > Hi Sheela, > > On Tuesday 23 Mar 2010 15:06:24 sheela b wrote: > > Hi All, > > > > How to delete last 10 lines of a file using Perl one liner? > > > > I used the following one l

RE: Object Oriented

2010-03-24 Thread Pry, Jeffrey
Damon, Thanks for such a quick reply. I recently started an internship and am seeing how learning Perl would be a valuable part of my toolset. I am new to OOP (having had some previous Java training) and would like to start out on the right track. I understand the whole dog is a animal and a ca

Re: Object Oriented

2010-03-24 Thread Steve Bertrand
On 2010.03.24 08:09, Pry, Jeffrey wrote: > Hey, > > Does anyone know of good resource to learn object oriented Perl? Also, can > Perl be considered truly object oriented? perldoc perlobj Also, quite a few years ago, I found "Learning Perl Ojbects, References and Modules" by Randal Schwartz to b

Re: Object Oriented

2010-03-24 Thread Shlomi Fish
On Wednesday 24 Mar 2010 14:09:19 Pry, Jeffrey wrote: > Hey, > > Does anyone know of good resource to learn object oriented Perl? Yes, see the resources at: http://perl-begin.org/topics/object-oriented/ In addition, there's also this: http://en.wikibooks.org/wiki/Programming_with_Moose > Als

Object Oriented

2010-03-24 Thread Pry, Jeffrey
Hey, Does anyone know of good resource to learn object oriented Perl? Also, can Perl be considered truly object oriented? Thanks, Jeffrey IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended reci

Re: IOScalar with threads dose not work

2010-03-24 Thread IIZUKA Soichi
Thanks for your help, shlomi. > 1. There's no such thing as IOScalar. Maybe you mean writing to an in-memory > buffer. Yes, in-memory buffer. That's what I meant. > 2. Don't use threads in Perl. They cause too many problems. Is there any workaround? to make multi-thread script without 'use thre

Re: Regex question

2010-03-24 Thread Dr.Ruud
Bruce Ferrell wrote: if ( ! defined $username || ! $username =~ /[0-9]{10,11}/ ) { do something; } else { do something else; } if ( $username and $username =~ /\A[0-9]{10,11}\z/ ) { ...; } else { die; } -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@p

Re: Getting garbage fast

2010-03-24 Thread Philip Potter
On 24 March 2010 00:56, Eric Veith1 wrote: > Sam wrote on 03/23/2010 11:18:11 PM: >> Could you use a file of random data? You can create one of those really >> easy: dd if=/dev/urandom of=ranfile bs= > > Theoretically, yes, of course I could just try to create an arbitrary > sized file from /

AW: Regex question

2010-03-24 Thread Thomas Bätzler
Bruce Ferrell wrote: > if ( ! defined $username || ! $username =~ /[0-9]{10,11}/ ) { > > do something; > > } else { > > do something else; > > } > > what that's supposed to do is this: > if it's blank or not 10 or 11 digits... > > The question is where is my understanding faulty or did I me

Re: Regex question

2010-03-24 Thread trapd00r
On 24/03/10 00:13 -0700, Bruce Ferrell wrote: if ( ! defined $username || ! $username =~ /[0-9]{10,11}/ ) { do something; } else { do something else; } what that's supposed to do is this: if it's blank or not 10 or 11 digits... The question is where is my understanding faulty or did I mess

Regex question

2010-03-24 Thread Bruce Ferrell
if ( ! defined $username || ! $username =~ /[0-9]{10,11}/ ) { do something; } else { do something else; } what that's supposed to do is this: if it's blank or not 10 or 11 digits... The question is where is my understanding faulty or did I mess up. Thanks in advance Bruce -- To unsubscri