The output from running a command in backticks will have newlines although in scalar context it could have more then just one at the end.
$ perl -le'$x = `pwd`; print $x =~ tr/\n//; $x = `ls -l`; print $x =~ tr/\n//;' 1 236
In other words 1 line ending for 'print working directory' and 236 for a 'long directory listing'.
:-)
tr/// returns the number of tranliterations done.
-Bill- __Sx__________________________________________ http://youve-reached-the.endoftheinternet.org/
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>