Skip to content

Instantly share code, notes, and snippets.

@note103
Created November 28, 2013 00:36
Show Gist options
  • Save note103/7685548 to your computer and use it in GitHub Desktop.
Save note103/7685548 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
my $data = q{
papix : sushi
moznion : soba
boolfool : sushi
macopy : sushi
};
my @str = split (/\n/, $data);
my $count;
for my $str (@str) {
if ($str =~ / : /) {
$count++;
}
}
print "$count\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment