basically i need to have 2 variables.. concat them and put them into use.

here is what i have done so far:

#!/usr/bin/perl

$stats = ':/var/tmp/RtcTestHarness/currentTransactionStats.txt';
$console = ':/var/tmp/RtcTestHarness/TestHarnessConsole.log';

$client_1 = '9.34.120.36';

#$com = $client_1.$stats;
#print $com;         the concat here looks fine...
 
system ("scp $client_1.$currentTranStats .");

anything wrong? missing the usage of chomp?

I'm on Windows and don't have the scp utility so can't test your code but I notice you use the variable $currentTranStats without having assigned a value to it.

Also note that while a dot between two text variables acts as the concatenation operator, a dot within double quotes is just a dot. For example,

DB<1> $x = 'hello';
DB<2> $y = 'there';
DB<3> print "$x.$y";
hello.there

The values of the two text variables are interpolated into the resulting string, but the dot appears as a literal dot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.