Re: Chomp method

2006-04-28 Thread Chad Perrin
On Fri, Apr 28, 2006 at 11:05:23AM -0400, Mr. Shawn H. Corey wrote: > On Fri, 2006-28-04 at 07:33 -0700, Randal L. Schwartz wrote: > > > ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: > > > > "Mr> Everyone should compliment their reading with experimentation and their > > "Mr> experim

Re: Chomp method

2006-04-28 Thread Mr. Shawn H. Corey
On Fri, 2006-28-04 at 07:33 -0700, Randal L. Schwartz wrote: > > ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: > > "Mr> Everyone should compliment their reading with experimentation and their > "Mr> experimentation with reading. > > Do you mean "complement", or do you mean that you

Re: Chomp method

2006-04-28 Thread Randal L. Schwartz
> ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: "Mr> Everyone should compliment their reading with experimentation and their "Mr> experimentation with reading. Do you mean "complement", or do you mean that you should say kind words about your reading? :) -- Randal L. Schwartz - St

Re: Chomp method

2006-04-27 Thread Chad Perrin
On Thu, Apr 27, 2006 at 08:23:52AM -0400, [EMAIL PROTECTED] wrote: > > Although the "try it and see" approach is fun and intellectually > challenging, it really isn't productive for everyone. For example, I > wouldn't like to be paying a contractor who is getting paid per hour to > do a lot of "tr

Re: Chomp method

2006-04-27 Thread Mr. Shawn H. Corey
On Thu, 2006-27-04 at 08:18 -0700, Randal L. Schwartz wrote: > > ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: > "Mr> A good way to learn how a function works is to write a small program to > "Mr> test it. There is nothing like hands-on experience. > > Unless your experience doesn't

RE: Chomp method

2006-04-27 Thread Russ Foster
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of > > > Instead of the perldoc chomp example of: > > It sounds as if you have ideas on how to improve the Perl > documentation. I heartily encourage you to contribute your > improvements by means of the p

Re: Chomp method

2006-04-27 Thread Tom Phoenix
On 4/27/06, Russ Foster <[EMAIL PROTECTED]> wrote: > Instead of the perldoc chomp example of: It sounds as if you have ideas on how to improve the Perl documentation. I heartily encourage you to contribute your improvements by means of the perlbug program, which comes with Perl. A patch to the .p

RE: Chomp method

2006-04-27 Thread Russ Foster
> -Original Message- > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > > However, you didn't challenge my point. You merely made a different > point. > It is *not* sufficient to merely experiment. Reading the reference doc is > mandatory for complete understanding. That's because I

Re: Chomp method

2006-04-27 Thread Randal L. Schwartz
> "Russ" == Russ Foster <[EMAIL PROTECTED]> writes: Russ> But that's exactly why you need to try it and see. The more a document Russ> spends on the arcane details of a function (which perldoc does), the more Russ> likely a beginner would get lost in those details and find some other source R

RE: Chomp method

2006-04-27 Thread Russ Foster
> -Original Message- > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > > For example, almost no amount of experimentation will stumble across > how chomp actually removes $/, not just "\n". But that's exactly why you need to try it and see. The more a document spends on the arcane de

RE: Chomp method

2006-04-27 Thread Ron Goral
> -Original Message- > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] > Sent: Thursday, 27 April, 2006 10:18 > To: beginners@perl.org > Subject: Re: Chomp method > > > For example, almost no amount of experimentation will stumble across > how chomp actual

Re: Chomp method

2006-04-27 Thread Randal L. Schwartz
> ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: "Mr> On Wed, 2006-26-04 at 23:07 -0700, Jaime Murillo wrote: >> The good way to learn how a function works is to use the perldoc utility. "Mr> A good way to learn how a function works is to write a small program to "Mr> test it. There

RE: Chomp method

2006-04-27 Thread Russ Foster
Great article! Thanks for the reference. -r > -Original Message- > From: Chad Perrin [mailto:[EMAIL PROTECTED] > > > > A good way to learn how a function works is to write a small program to > > test it. There is nothing like hands-on experience. > > . . . or "Apply the T.I.T.S. principl

RE: Chomp method

2006-04-27 Thread Richard.Copits
to carry a cat by its tail learns something that will always be useful and which will never grow dim or doubtful." Mark Twain -Original Message- From: Chad Perrin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 7:55 AM

Re: Chomp method

2006-04-27 Thread Chad Perrin
On Thu, Apr 27, 2006 at 07:25:15AM -0400, Mr. Shawn H. Corey wrote: > On Wed, 2006-26-04 at 23:07 -0700, Jaime Murillo wrote: > > The good way to learn how a function works is to use the perldoc utility. > > A good way to learn how a function works is to write a small program to > test it. There i

Re: Chomp method

2006-04-27 Thread Mr. Shawn H. Corey
On Wed, 2006-26-04 at 23:07 -0700, Jaime Murillo wrote: > The good way to learn how a function works is to use the perldoc utility. A good way to learn how a function works is to write a small program to test it. There is nothing like hands-on experience. -- __END__ Just my 0.0002 million

Re: Chomp method

2006-04-26 Thread John W. Krahn
AndrewMcHorney wrote: > Hello Hello, > I am wondering how the chomp function works. I am looking to see how I > can truncate new line and/or carriage returns from a string. Will chomp > do nothing if there are no carriage return or line feed at the end. If > the end of the string has a space will

Re: Chomp method

2006-04-26 Thread Jaime Murillo
On Wednesday 26 April 2006 22:51, AndrewMcHorney wrote: > Hello Hey Andrew > > I am wondering how the chomp function works. I am looking to see how > I can truncate new line and/or carriage returns from a string. Will > chomp do nothing if there are no carriage return or line feed at the > end. If

Re: Chomp method

2006-04-26 Thread nishanth ev
Hello, The chomp function will chomp off the last character if its a new line. Spaces wont be truncated by chomp. Regards Nishanth > Hello > > I am wondering how the chomp function works. I am > looking to see how > I can truncate new line and/or carriage returns from > a string. Will > chom