Help for this page

Select Code to Download


  1. or download this
    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;
    
  2. or download this
    $VAR1 = [
              'http://abc.org',
              'http://de,f.org',
              'https://ghi.org'
            ];