You miss my point but thanks for the syntax check.  I am concerned with 
comparing the functionality, one versus the other.
 
Thanks.

--- On Mon, 8/3/10, Shawn H Corey <[email protected]> wrote:


From: Shawn H Corey <[email protected]>
Subject: Re: tr// versus s///g
To: "Tony Esposito" <[email protected]>
Cc: "Beginners Perl" <[email protected]>
Date: Monday, 8 March, 2010, 9:38


Tony Esposito wrote:
> Does tr/'\n'/' '/ do the same as tr/'\n'/' '/g?  ( replace newline with space 
> )
> If so, is one preferred over the other?

Neither of the above is correct.  The correct forms are:

tr/\n/ /;
s/\n/ /g;


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Eliminate software piracy:  use only FLOSS.

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/





      

Reply via email to