I have the following script that seems to work for me locally on my computer - from within a .htm file. But when I upload it and try to get it to work noting happens(is writen). Could yee guys help me out with some pointers.
$window->document->write("<BR> Hi.<BR> "); $window->document->write("Here is a try using a PerlScript.<BR> "); sub PrintWelcome { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(); $thisday=(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday +)[$wday]; $thismon=(January,February,March,April,May,June,July,August,Septem +ber,October,November,December)[$mon]; if ($hour < 12) { $window->document->write( "Good morning! "); } elsif ($hour < 17) { $window->document->write( "Good afternoon! "); } else { $window->document->write( "Good evening! "); }; $ampm = 'AM'; if ($hour > 12) { $hour-=12; $ampm = 'PM'; } $time = sprintf '%d:%2.2d:%2.2d',$hour,$min,$sec; $year += 1900; $datetime = $time.' '.$ampm.', '.$thisday.', '.$thismon.' '.$mday. +', '.$year; $window->document->write("Just in case you were wondering, it's<BR +> "); $window->document->write($datetime); $window->document->write("<BR> <BR> Your username is $ENV{'USERNAME'} +(it\'s in \$ENV{'USERNAME'}), the computername is $ENV{'COMPUTERNAME' +} (it\'s in \$ENV{'COMPUTERNAME'}), and your OS is $ENV{'OS'} (it\'s +in \$ENV{'OS'}).<BR> "); $window->document->write("<BR> <BR> Here is everything in %ENV:<BR> ") +; foreach $key (sort(keys %ENV)) { $window->document->write("<BR> $key" . " = " . $ENV{$key} . "<BR> "); } my @rec = `ipconfig /all`; # print "@rec\n"; # to print out all of the command's output my $itemmac; foreach $itemmac (@rec){ #chomp $itemmac}; # to split line 12 of the above, up into fileds/one-words #my ($field1, $field2, $field3, $field4, $field5, $field6, $field7, $f +ield8, $field9, $field10, $field11, $field12, $mac) = split(/\s+/, $r +ec[13]); #print "Your MAC(Media Access Control)/Physical Address in hexadecimal + is: $mac\nThe first three bytes (e.g., 00-0A-CC) are the manufacture +r's code and can be used to identify the manufacturer.\nThe last thre +e are the unique station ID or serial number for the interface.\n"; $window->document->write("<BR> <BR>Your MAC(Media Access Control)/Phys +ical Address in hexadecimal is: $itemmac<BR> "); }; } PrintWelcome();

In reply to remote perlscript by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.