in reply to what is the use of derefernce in substitution?
I, on occasion, do this in my code when adding a characters to an interpolated string, but generally there is a better way to do it. My preference is to concatenate variables individually instead of wrapping in double quotes.
my $string1 = 'test'; my $string2 = "${string1}append"; # my preference my $string3 = $string1 . 'append';
In the case of replacements this approach could be replicated with the /e modifier. Which again is just my preference, but is what I would do in this case.
|
|---|