Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between $dxyabc and ${dxyabc} in Perl?

Tags:

perl

What is the difference between definition of string $dxyabc and string ${dxyabc} in Perl?

like image 338
user3565186 Avatar asked Dec 03 '22 19:12

user3565186


1 Answers

Well, it depends on the context. For example,

$foo = "$dxyabcdef";
$bar = "${dxyabc}def";

$foo will have the value of $dxyabcdef instead of $dxyabc appended with def, this is the value of $bar.

Otherwise, as far as I know, they are the same.

like image 68
Lee Duhem Avatar answered Dec 24 '22 17:12

Lee Duhem