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 <shawnhco...@gmail.com> wrote:


From: Shawn H Corey <shawnhco...@gmail.com>
Subject: Re: tr// versus s///g
To: "Tony Esposito" <tony1234567...@yahoo.co.uk>
Cc: "Beginners Perl" <beginners@perl.org>
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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/





      

Reply via email to