Thanks again... Satya


                                                                                       
                                
                    "Brett W. McCoy"                                                   
                                
                    <bmccoy@chapelper        To:     
[EMAIL PROTECTED]                                
                    ilous.net>               cc:     "Nikola Janceski" 
<[EMAIL PROTECTED]>,                 
                                             [EMAIL PROTECTED]                        
                                
                    02/20/2002 04:26         Subject:     RE: Grep function inside a 
for loop does NOT grep the        
                    PM                       values.                                   
                                
                                                                                       
                                
                                                                                       
                                




On Wed, 20 Feb 2002 [EMAIL PROTECTED] wrote:

> Thank you - it worked. I got my output as expected. But why is '\n'
> considered so bad in perl unlike shell scripting. Why did I not get the
> output with '\n'. Just curious!!!

It's not considered bad, but it can mess up things when you are trying to
match a pattern against 'string\n' when you really mean 'string'.  It's
good practice to chomp off the trailing newline from input so you can do
stuff with it, then put the newline back on when you output it.  I've
gotten bittne by this so many times I just chomp my input now as a matter
of course. :-)

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Ideas don't stay in some minds very long because they don't like
solitary confinement.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to