In Perl, you can create an empty string by assigning an empty value to a scalar variable.
In this example,
$empty_string
.$empty_string
now holds an empty string.# Empty String Example
my $empty_string = '';
print "Empty string created: '$empty_string'\n";
Empty string created: ''
In this tutorial, we learned How to Create an Empty String in Perl language with well detailed examples.