Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1e007a96761035f261351a68e7601417 > files > 858

parrot-docs-3.6.0-2.fc15.noarch.rpm

# Copyright (C) 2007-2009, Parrot Foundation.

=head1 String Operations (continued)

PIR has a string repeat opcode, that concatenates a string with
itself N times.

=cut

.sub main :main

    $S0 = "Hello "
    $S1 = repeat $S0, 3

    say $S1 # prints "Hello Hello Hello \n"

.end

# Local Variables:
#   mode: pir
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir: