I have a directory where there are more than 10 files which start with pattern "my_Report". While i tried using glod for this job,it just picked only a single file . Is there any problem with the syntax below
$g_map{"Rep"} = glob ("data_1/reports/my_Report*"); Alternatively , i tried using grep to find all the files and stored it in a hash
$g_map{"Rep"} = [grep {!/\.xh$/} <data_1/reports/my_Report*>]; My Requirement is to find all the files with specific pattern from the directory and store it in a hash with key "Rep" How do i achieve the same with glob?
Thanks in Advance
/at the beginning of the path. In the lower one, there is not.ls, but mob is right below in their answer.