#!/usr/bin/perl open (F, "counter.txt"); # Read the old count $count = ; close (F); open (F, ">counter.txt"); # Add 1 and save the new count $count=$count+1; print F $count; close (F); print $count; # Display the new count