@files = qw(model4run1 model2run1 model4run2 model); $reg = ' \\1[^ ]*' x $#files; "@files" =~ /^([^ ]*)[^ ]*$reg$/; print $1;
In reply to Re: Find common prefix from a list of strings
by Jasper
in thread Find common prefix from a list of strings
by Albannach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |