thanks choroba and QuillMeantTen.
I am still confused. what is its value of "$hash" after performing "unshift @queue , map {$_, $hash} @new_paths;"
And I always feel that the value of "$hash" is "undef" all alone, because "map" seems not to be able to assign a value to $hash.
root@TestMachine:~/excerise_perl# perl data_for_path.pl
$VAR1 = {
'test' => {
'file2' => undef,
'file1' => undef,
'dir1' => {
'file3' => undef
}
}
};
as the result from above, How does $$data->{'test'} point to its child directory. |