Monday, February 06, 2012
X Close Employee Log In Display
Employee #:
Password:
X Close Lost Password Display
Enter your email address:
Employee Services: Log In  | Registration  | Lost Password?
2338 Pacemakers Registered
Promoting and Sharing the Memory and Spirit
of Piedmont Airlines
Celebrating 12 Years Online - 1999-2011
 
Piedmont Airlines || Route of the Pacemaker
#!/usr/local/bin/perl ############################################################################## # Random Text Version 1.0 # # Copyright 1996 Matt Wright # ############################################################################## # Define Variables # # This is the file in which all of your random text phrases are stored. # $random_file = "/domains/jetpiedmont.com/public_html/include/random.txt"; # The delimiter specifies how each phrase is distinguished from another. For# # instance, the common fortune file (a Unix program) is delimited by a new # # line followed by two % signs on the next line and then a new line. This is# # a pretty good format and you can read more about it in the README file. # $delimiter = "\n\%\%\n"; # Done # ############################################################################## # Open the file containing phrases and read it in. open(FILE,"$random_file") || &error('open->random_file',$random_file); @FILE = ; close(FILE); # Join these lines from the file into one large string. $phrases = join('',@FILE); # Now split the large string according to the $delimiter. @phrases = split(/$delimiter/,$phrases); # Invoke srand; with a seed of the time and pid. If you are on a machine # which doesn't put the pid into $$ (ie. Macintosh, Win NT, etc...), change # this line to: srand(time ^ 22/7); srand(time ^ $$); # Now pluck our random phrase out of the @phrases array! But wait! This # only returns a number. $phrase = rand(@phrases); # Print out the Content-type header, so the browser knows what's going on. print "Content-type: text/html\n\n"; # Change this number into the text we want to return and print it! print $phrases[$phrase]; # All Done! exit; # Was there an error? If so, let's report that sucker so it can get fixed! sub error { ($error,$file) = @_; print <<"END_ERROR"; Content-type: text/html ERROR: Random File Unopenable

ERROR: Random File Unopenable

The random file, as specified in the \$random_file perl variable was unopenable.

END_ERROR if (-e $random_file) { print "The file was found on your system, so make sure that it is\n"; print "readable by the web server. This means you will need to\n"; print "execute the following command:

\n";
        print "    chmod 744 $random_file\n";
        print "
\n"; } else { print "The file was not found on your file system. This means that\n"; print "it has either not been created or the path you have specified\n"; print "in \$trrandom_file is incorrect.\n"; } exit; }


Circa 1953-00-00
Circa 1973-03-15
Circa 1975-09-03
Circa 1981-10-25
Circa 1982-07-11Piedmont opens the Dayton Hub
Circa 1983-07-15Piedmont opens the Baltimore Hub
Circa 1986-02-15Empire and Piedmont prepare for Merger May 1, 1986
Circa 1987-00-00
Circa 1987-06-15Piedmont begins transatlantic 767 service to London
Circa 1989-01-04
Circa 1989-03-00Piedmont/US Air Route Overlay just prior to merger
Circa 1989-08-01Combined Routes just after merger
JetPiedmont.com is owned and operated by The Piedmont Aviation Historical Society
P.O. Box 25864  |  Winston-Salem, North Carolina 27114-5864
No part of this web site may be copied or reproduced without prior written consent.
Copyright © 1999- All Rights Reserved
User IP Address Logged As: 38.107.179.210