Help for this page
use strict; use warnings; ... my $input = q|http://abc.org,http://de,f.org,https://ghi.org,http://jk +l.org|; my @urls = (split /,(?=http)/, $input, 4)[0..2]; print Dumper \@urls;
$VAR1 = [ 'http://abc.org', 'http://de,f.org', 'https://ghi.org' ];