On Mon, May 15, 2006 4:21 am, mickb@xxxxxxx wrote: > I'm currently writing a PHP page, which uses a small Perl script. But > I > encounter an annoying problem with endline character. > > A small example : > > $perl = new Perl(); > $perl->eval('print "toto\ntata"'); Your apostrophes in PHP don't interpolate anything except: \' an embedded apostrophe \\ an embedded backslash $perl = new Perl(); $perl->eval("print \"toto\ntata\""); would work. If Perl is okay with ' for a string delimiter, this would also work: $perl->eval("print 'toto\ntata'"); and maybe be more readable to a novice PHP developer. Homework: http://php.net/manual/en/language.types.string.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php