If any of you know some perl could you look at this and see if you can offer any help. I posted at the perl forum as well but figured you guys might have something to offer as well:
I have the following in a file which writes the date to a .txt file.
#!/usr/local/bin/perl
$datetime = scalar(localtime(time));
print "Content-type: text/html\n\n";
print "1datetime=$datetime\n";
open(F,'>1datetime.txt');
print F "datetime=$datetime";
close(F);
the 1datetime.txt seems to be working and shows the datetime=Fri Mar 1 19:57:18 2002 in WS_FTP view ,however, it will not pull it up online... says server error. I have it chmodded correctly I think. Any ideas as to why it would be doing this or is my code totally wrong? The 1datetime.pl shows fine in both WS_FTP view and online. This is like my first attempt at perl... I know a little VB and just enough javascript and actionscript in Flash to be dangerous so I could be way off base.
I was given some code in the perl forum and I merely tweaked it a little and tried to run it...
I have 7 users, my flash loads the users .pl file when they log in and it writes the date to their .txt file. The man in charge has a user page set up which pulls all these 7 variables from their personal .txt files and is able to see when they logged on last.
There is most likely a better way of doing this with an array or such but this is the best I have come up with considering my limited knowledge of perl.
I took the die part off as well... what is that anyway and do I need to leave it in the code?
I am open for ideas and someone please look at my code and see if it could be causing the server error. Ya' Gotta Love It!
I have the following in a file which writes the date to a .txt file.
#!/usr/local/bin/perl
$datetime = scalar(localtime(time));
print "Content-type: text/html\n\n";
print "1datetime=$datetime\n";
open(F,'>1datetime.txt');
print F "datetime=$datetime";
close(F);
the 1datetime.txt seems to be working and shows the datetime=Fri Mar 1 19:57:18 2002 in WS_FTP view ,however, it will not pull it up online... says server error. I have it chmodded correctly I think. Any ideas as to why it would be doing this or is my code totally wrong? The 1datetime.pl shows fine in both WS_FTP view and online. This is like my first attempt at perl... I know a little VB and just enough javascript and actionscript in Flash to be dangerous so I could be way off base.
I was given some code in the perl forum and I merely tweaked it a little and tried to run it...
I have 7 users, my flash loads the users .pl file when they log in and it writes the date to their .txt file. The man in charge has a user page set up which pulls all these 7 variables from their personal .txt files and is able to see when they logged on last.
There is most likely a better way of doing this with an array or such but this is the best I have come up with considering my limited knowledge of perl.
I took the die part off as well... what is that anyway and do I need to leave it in the code?
I am open for ideas and someone please look at my code and see if it could be causing the server error. Ya' Gotta Love It!
![sleepyangelsBW.jpg](http://www.jeffphillips.f2s.com/sleepyangelsBW.jpg)