in reply to find module name from the module archive
Not to answer your question but to comment on your regular expression: $module =~ s/(.*)-.*/$1/; This is hard to read (and not very efficient). Try this instead:
$module =~ s/\-[^-]*$//;
This will remove everything from the last minus sign inclusively to the end of the line.
Rule of thumb: Try to make all your patterns start with a character and not a wildcard.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: find module name from the module archive
by Lotus1 (Vicar) on Dec 12, 2016 at 02:25 UTC | |
by shawnhcorey (Friar) on Dec 21, 2016 at 19:51 UTC |