Thread integer und split (3 answers)
Opened by nano at 2015-04-05 02:26

Gast wer
 2015-04-05 11:48
#180592 #180592
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl
use strict;
use warnings;

my $word = 'abbbattaaajqaAAAgtAWG';

print cound_chars('a',$word)."\n";

sub cound_chars { return ( grep $_ eq $_[0], split //, $_[1] ) + 0; }

Last edited: 2015-04-05 14:13:36 +0200 (CEST)

View full thread integer und split