How to avoid the space

Hi,

I have some problem with following command.

$path='pwd'.�/pack�;
When I check the value in the variable path , it give the following output

/tmp/new /pack

The pwd will be /tmp/new
Now the problem is the spaces is added between pwd and the appended path.
I need the output like /tmp/new/pack

Could you please help me how I can avoid the space.

Regards,
Kalai

What shell is this? Or Perl? PHP?

i added this command in perl script

Maybe write it like this:

root@isau02:/data/tmp/testfeld> cat mach.pl
$path=`pwd`;
$add="/pack";

chomp($path);  # to remove the trailing newline

print $path . $add . "\n";
root@isau02:/data/tmp/testfeld> perl -wf ./mach.pl
/data/tmp/testfeld/pack
$ pwd
/tmp
$ perl -e 'print $ENV{'PWD'} . "/pack\n"'
/tmp/pack

This command gives output without space in ksh.