in reply to Re^4: Split and print hash based on regex
in thread Split and print hash based on regex
choroba is not wrong to write here that "... without a capture group in the regex, there's no way to populate $1." But as always with regexes, it's more complicated:
Due to the influence of the /g modifier, something is captured, it's just not anythingc:\@Work\Perl\monks>perl -wMstrict -le "$_ = 'This is not an exit'; ;; if (my ($regex) = /This is/g) { print qq{matched, captured '$regex'}; } " matched, captured 'This is'
Give a man a fish: <%-{-{-{-<
|
|---|