Question:

Write a program to concatenate the $firststring and $secondstring and result of these strings should be separated by a single space.

Answer:

Syntax:

$result = $firststring . ” “.$secondstring;

Program:

#!/usr/bin/perl
 
$firststring = "abcd";
 
$secondstring = "efgh";
 
$combine = "$firststring $secondstring";
 
print "$Combine\n";

Output:

abcd efgh


Keywords:

© 2017 QuizBucket.org