| | |
variable concat and exec cmd question
![]() |
•
•
Join Date: Nov 2007
Posts: 227
Reputation:
Solved Threads: 0
basically i need to have 2 variables.. concat them and put them into use.
here is what i have done so far:
anything wrong? missing the usage of chomp?
here is what i have done so far:
Perl Syntax (Toggle Plain Text)
#!/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?
•
•
Join Date: Sep 2009
Posts: 40
Reputation:
Solved Threads: 6
0
#2 17 Days Ago
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,
The values of the two text variables are interpolated into the resulting string, but the dot appears as a literal dot.
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,
Perl Syntax (Toggle Plain Text)
DB<1> $x = 'hello'; DB<2> $y = 'there'; DB<3> print "$x.$y"; hello.there
![]() |
Similar Threads
- quick cmd question (Windows Vista and Windows 7)
- Deleting Files (Java)
- Function and variable next (C++)
- java and cmd (Java)
- Gettin the Domain User name (Enviromental Virables) (Java)
- Setting Environment Variable using C# (C#)
- PHP / Flash Variable Email Script Format Question (PHP)
- can i update variable using concat and for-each? (XML, XSLT and XPATH)
- Process started with Runtime.getRuntime().exec() stops responding after a while (Java)
Other Threads in the Perl Forum
- Previous Thread: php coding
- Next Thread: suggestions for writing automation script
| Thread Tools | Search this Thread |





