Converting '\n' to "\n"

Paul Fenwick pjf at perltraining.com.au
Tue Jun 10 05:18:54 CDT 2003


G'day David,

On Tue, Jun 10, 2003 at 07:59:50PM +1000, David Dick wrote:

> Struck an interesting one today.  Starting with
> 
> my ($t) = '\n';
> 
> how does one convert it to be equal to "\n", ie a normal line feed?

	$t =~ s/\\n/\n/g;

Or am I missing something here?

Cheers,
	
	Paul

-- 
Paul Fenwick <pjf at perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681



More information about the Melbourne-pm mailing list