in reply to Re^2: Matching hyphens in file path to extract zip code
in thread Matching hyphens in file path to extract zip code
just a little more code
Not significantly, I just wrote it more verbosely.
use File::Basename; my ($zip) = fileparse($file) =~ /^(\d{5})\D/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Matching hyphens in file path to extract zip code
by Anonymous Monk on Feb 05, 2020 at 15:28 UTC | |
by Anonymous Monk on Feb 05, 2020 at 23:24 UTC |