Now, @files will contain only the file(s) matching the regex.@files = grep { /_CF_/ } @files;
But it is probably clearer (and easier to debug if you need) to grep the matching values into a new array and leave the original one untouched.
In reply to Re^3: Setting a Variable from filename
by Laurent_R
in thread Setting a Variable from filename
by UpMaBigKilt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |