Programming Languages C++ Subjective
Mar 13, 2013

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

Detailed Explanation

Syntax:

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

Program:

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

Output: abcd efgh

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback