# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/sbin/snappd/scripts/Refresh.pl 1.3 # # Licensed Materials - Property of IBM # # COPYRIGHT International Business Machines Corp. 2000,2002 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # #!/usr/bin/perl -T # @(#)10 1.3 src/bos/usr/sbin/snappd/scripts/Refresh.pl, snapp, bos720 5/31/02 07:50:59 #------------------------------------------------------------------ #--------Refresh page for Snapp Program --------------------------- #------------------------------------------------------------------ #--------This page reloads whatever Page that was last ----------- #--------Loaded on to the palm ----------- #------------------------------------------------------------------ $ENV{'PATH'} = '/bin:/usr/bin'; open (HISTORYFILE, "/var/snapp/snapp.History"); open (HISTORYTMP, ">/var/snapp/snapp.History.tmp"); @VisitedPages = ; $length = @VisitedPages; for ($i = 0; $i < $length; $i++) { print HISTORYTMP "$VisitedPages[$i]"; } $RefreshPage = $VisitedPages[$length - 1]; print "$RefreshPage\n"; close (HISTORYFILE); close (HISTORYTMP); system("/usr/bin/cp /var/snapp/snapp.History.tmp /var/snapp/snapp.History"); system($RefreshPage);