Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!usr/bin/perl -w
- use strict;
- my($old, $new, $total) = (1, 1, undef);
- open DATA, ">>data.txt"
- or die "Couldn't access data.txt: $!";
- sub math
- {
- $total = $old + $new;
- print "$old + $new = $total\n";
- print DATA "$old + $new = $total\n";
- $old = $new;
- $new = $total;
- sleep(1);
- }
- while(1 eq 1)
- {
- &math;
- }
Add Comment
Please, Sign In to add comment