4 ms·
This is my instinct working with Perl. Test the input with a regex and move on.
by 2OEH8eoCRo0 5y ago
This is my instinct working with Perl. Test the input with a regex and move on.
- mst 5y agoBetter still, with -somebody elses- regexp. p3rl.org/File::Spec#no_upwards - after calling splitpath and splitdir from the same module - is very much my friend. (or for advanced mode, Path::Tiny, possibly with the help of App::FatPacker to condense back down to a single script if you're writing something you need to be able to copy around without thinking about dependencies)