Updated: 04/26/2017 by Computer Hope

Concatenate, concatenation, or concat is a term that describes combining a string, text, or other data in a series without any gaps. In programming languages, an operator is used to denote concatenation. For example, In the Java programming language, the operator "+" denotes concatenation, as it does in other programming languages.

Java concatenate

In the below Java example using the "+" operator on the string "Hello," and the string " how are you?" would produce the single string "Hello, how are you?" when the program runs.

System.out.println("Hello," + " how are you?");

Perl concatenate

Other programming languages such as Perl can use a period for concatenation. For example, printing the same "Hello, how are you?" text in Perl would look similar to the example below.

print "Hello, " . "how are you?";

A variable could also be concatenated into the text as shown in the example below. In this example, the output would be "Hello Nathan, how are you?" when running the script.

my $name = "Nathan";
print "Hello " . $name . ", how are you?";

Excel and spreadsheet concatenate

Concatenate is also an Excel formula function. For example, in the below formula the concatenate function will combine the data in cell A2 with the date in cell B2 with a space delimiter.


See our How to combine cell values in Excel for full information on how to do this in Microsoft Excel.

Related pages

  • MS-DOS users who want to combine the contents of one or more files into a single file can use the copy command.
  • Linux and Unix users can combine one or more files using the cat command.

Append, Combine, Programming terms