A kiosk line

A string in the script.

Keep the text in the script (or paste kiosk.txt).

Goal

Split kiosk lines and say city + units.

use strict;
use warnings;
use feature 'say';

my $text = "Nairobi,12\nMombasa,8\nKisumu,5";
foreach my $line (split /\n/, $text) {
  my ($city, $units) = split /,/, $line;
  say "$city $units";
}
use strict;
use warnings;
use feature 'say';

my $text = "Nairobi kiosk\nMombasa kiosk";
my @lines = split /\n/, $text;
say scalar @lines;
say $lines[0];
use strict;
use warnings;
use feature 'say';

my ($city, $units) = split /,/, "Nakuru,4";
say $city;
say 0 + $units;
use strict;
use warnings;
use feature 'say';

say "kiosk.txt is a banner download — or paste the string as above";