I cant seem to get the split right. The file that it finds looks like this xx11_xxxxx.xxx, and there's more than one of those with the same format. Now I want to get the digit (11)from that file of that format, and the other as well, and assign to it a variable. Here's the code, now where am I going wrong? I know its gotta be within the match of the split. I tried everything but nothing seems to work.. Someone please help me out...<br><br>opendir (DIR,"\Program files"
;<br>@files = readdir(DIR);<br>foreach $file(@files) {<br> if ($file =~ /[^.*](\d+)_.*/i) {<br> $num = $1;<br> @nums = split (//, $num);<br> foreach $val (@nums) {<br> print "$val\n"; <br> }<br> }<br>closedir (DIR);<br> }<br>