#include <iostream> using namespace std; int main(int argc, char ** argv) { cout << "Hello world" << endl; return 0; }
global $link, $use_captcha,$admin,$local_dir; $link=null; $edit=0; $use_captcha=false; session_start(); $hidel = false; $admin = false; if (isset($_GET['fall']) || isset($_GET['spring'])) $hidel=true;
#!/usr/bin/perl -T -w #!/bin/env perl ################################################################################ #Understand the local environment use Cwd; my $AF_INET=2; my $debug=0; my $function;#Allows us to either ping or traceroute (my $progname = $0) =~ s'^.*/''; my $uid=scalar(getpwuid($<)); #Get fully qualified IP address of the local host use Sys::Hostname; my $ipaddr=gethostbyname(hostname()); my ($a, $b, $c, $d)=unpack('C4',$ipaddr); my ($hostname,$aliases, $addrtype, $length, @addrs) = gethostbyaddr($ipaddr,$AF_INET); $ipaddr=$a.".".$b.".".$c.".".$d; my $site="";#Allows us to special case SLAC's configuration if($hostname=~/\.slac\.stanford\.edu/) {$site="slac";} my $archname=$^O; my $Tr = 'traceroute'; # Usually works ########################## Get the form action field ######################### #$form allows one to use a different form action field, e.g. #REQUEST_URI is of the form: /cgi-bin/traceroute.pl?choice=yes my ($temp, $bin_dir); ($temp,$bin_dir,$temp)=split /\//,$ENV{'REQUEST_URI'}; my $form="<form action='/$bin_dir/$progname' method='GET'>"; if($debug>0) {print "REQUEST_URI=$ENV{'REQUEST_URI'}, bin_dir=$bin_dir, form=$form<br>\n";}