- or download this
sub splitAB
{
my $STRING = shift;
...
my $S = shift;
return unescape( join(' ', split('\+', $S) ) ); #####
}
- or download this
pattern in sub splitAB= ?
string in sub splitAB = file:///c:/html/testing.html?P1=123&P2=%28%28B
+LAH+BLAH+BLAH%29%29
...
R: P2
R: ((BLAH BLAH BLAH))
Process completed successfully
- or download this
my @OUTPUT = split(/\Q$PATTERN\E/, $STRING, 2); #####
$a = $b = '';
if (@OUTPUT > 0) { $a = $OUTPUT[0]; }
if (@OUTPUT > 1) { $b = $OUTPUT[1]; }
- or download this
($a, $b) = split(/\Q$PATTERN\E/, $STRING, 2); #####
$a //= ''; #null string if undefined
$b //= ''; #null string if undefined