0

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?

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by d5e5
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.