#!/usr/bin/perl #*********************************************************** #*** Main Routine *** #*********************************************************** $tmp_string = $ENV{PATH_TRANSLATED}; $start_ptr = rindex($tmp_string,"picnum="); $start_ptr = $start_ptr + 7; #increment past "picnum=" $end_ptr = rindex($tmp_string,"&"); $len_num = $end_ptr - $start_ptr; $picnum = substr($tmp_string,$start_ptr,$len_num); $picnum = $picnum + 1; if ($picnum < 7 && $picnum > 0 ) { print("Content-Type: text/html\n\n"); print ""; print "\n"; print "This is a Title"; print "\n"; print ""; print "

The frame # is ", $picnum, "

"; print "To stop this, and see the Perl Source Code "; print ""; print "Click here."; } else { print("Content-Type: text/html\n\n"); print "This is a Title"; print "\n"; print "

All done.

"; print "To see the Perl Source Code"; print ""; print "Click here."; print "
Back to Examples page."; }