I am trying to read input of two strings from the user keyboard, store them in two variables and concatenate the two strings together using the Perls dot operator.
Research I found online shows an example similar to what I am trying to accomplish. This example uses only one string variable in the concatenation but I think something similar should be able to concatenate multiple variables together:
$name = checkbook';
$filename = '/tmp/' . $name . '.tmp';
#$filename now contains "/tmp/checkbook.tmp"
(http://alvinalexander.com/perl/edu/articles/pl010003.shtml)
my code is displayed in the following - however, I am still getting the undesired concatenation :
$stringa=<STDIN>;
$stringb=<STDIN>;
print $stringa.$stringb;
compiled using perl (path)
output
nein
ja
nein
ja
instead of the desired output:
nein
ja
neinja
why am I not getting the concatenation output I think it should produce?