Help for this page

Select Code to Download


  1. or download this
    my $str = "P H A G E P H A G E P Q K R E P H A G E P W S Q E P H A G E
    + P R D L E P H A G E";
    
    $str =~ s/\s+//g;
    my @words = $str =~ /.{1,5}/g;
    
  2. or download this
    my @array = ('P', 'H', 'A', 'G', 'E', 
                 'P', 'H', 'A', 'G', 'E',
    ...
    while (@array) {
       push(@words, join('', splice(@array, 0, 5)));
    }
    
  3. or download this
    foreach (@words) {
       next unless $_ eq 'PHAGE';
       print("$_\n");
    }