The following line works, even though I forgot to double quote the variable.

my $student_directory =  '/data/students/' . $student_id;

When I noticed this, I thought this was convenient: perl is trying to “do the 
right thing.” But I worry that leaving them out may be bad coding practice; if 
so, or you see other worthwhile improvements, please let me know.

More importantly, I wonder how perl knows to do this. Perhaps  context provided 
by the assignment operator or the concatenation operator? If there is a general 
rule on this, it would help me to know more widely when I can omit double 
quotes.

Thanks!

Rick Triplett

Reply via email to