#/usr/bin/perl -w use strict; my $count = 0; while (1) { open(FILE,"filename.txt"); print FILE "$count - \n"; close(FILE); sleep(100); count++; } #### case "$1" in start) daemon /usr/local/bin/myscript.pl ;; stop) #stop stuff here ;; esac