I am very new to perl, so I am sure that my confusion here is simply due to a lack of understanding of the perl syntax and how it handles bare words. I cannot find good answers to my question on the Internet, though.
I had a code that I refactored, it looks like this:
@month_dirs = <$log_directory/*>;
I changed $ log_directory to load the configuration file (more precisely, AppConfig). Now, instead of exporting $ log_directory, we print $ conf, which is an AppConfig object. To access loadable variables, you usually call a method call on the variable name, so I tried ...
@month_dirs = <$conf->log_directory()."/*">
This fails because I cannot make a call to the $ conf-> log_directory method where the barrier is expected. Just playing, I tried this instead
$month_directory_command = $conf->log_directory()."/*";
@month_dirs = <$month_directory_command>;
- , - , . , , -, , , , , , , Barewords , , , ?
,
$month_directory_command = $conf->log_directory();
@month_dirs = <$month_directory_command/*>;
. , , :
$bare_word = $conf->log_directory()
$month_directory_command = $conf->log_directory();
$bare_word = $month_directory_command/*;
@month_dirs = <$bare_word>;
, ? , ?
perl , , , , .
, - bareword . , , ?
barword , , , , , , , , .
, , , perl? - , ?