in reply to Re^4: Matching dot using regexp
in thread Matching dot using regexp

split is happy with any string (or anything that can be converted to a string) as a /PATTERN/, e.g.,

c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my $tim = '10:00:10.004'; ;; my @outputlist = split '[:.]', $tim; dd \@outputlist; ;; my $p = 10; @outputlist = split $p, $tim; dd \@outputlist; " [10, "00", 10, "004"] ["", ":00:", ".004"]
However, I would incline to use  // qr// m// for any but the most simple and straightforward patterns; I vaguely recall pitfalls involving backslashes.


Give a man a fish:  <%-{-{-{-<