Skip to content

Commit 59616f6

Browse files
committed
an example program using bigints which runs under 5 and 6
1 parent 14fbd17 commit 59616f6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/Language/faq.pod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,4 +561,14 @@ Examples:
561561
562562
1;
563563
564+
# A perl program which works under both perl5 (with perl -Mbigint)
565+
# and perl6
566+
567+
my ($prev, $current) = (1,0);
568+
569+
for ( 0..100_000) {
570+
($prev, $current) = ($current, $prev + $current);
571+
}
572+
print $current;
573+
564574
=end pod

0 commit comments

Comments
 (0)