Because the former interpolates a variable into a string which involves stringising the variable and that fails if the variable is not defined.
The latter is simply copying the contents of a variable that happens to be undef into another variable. No interpretation of the contents of the variable required so no error.
In reply to Re: 'use of uninitialised value' error message
by GrandFather
in thread 'use of uninitialised value' error message
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |