[MacPerl-AnyPerl] IP Push I Guess ??

2001-11-29 Thread John Murray
If I send a form to a script that the sends back some html, the browser displays that. Now, obviously it's an IP address thing. You know, you pass your IP address along with the form data when you click submit. What is it then that stops people pushing a html file at a known IP that is currently

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-12 Thread John Murray
> > @daynames = ('mon','tue','wed','thu','fri','sat','sun'); > > @monthdays = (31,58,89,119,150,180,211,242,272,303,333,364); > > Given that there are 365 days in a year, not 364, I think something is > amiss Specifically, you've added 27 days for February, instead of 28. > > Anyway, I would

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-12 Thread John Murray
> if ($year % 4) = 0{$complete_months_contribution ++}; oops ... this will only get incremented if we are into march and it is a leap year, so we'll need to test if $monthnum > 2 as well: if ( ($year % 4 = 0 ) && ($monthnum > 2) ){$complete_months_contribution ++};

Re: [MacPerl-AnyPerl] input to formatted date

2001-03-11 Thread John Murray
I'd give each day from 1/1/0001 a sequential number, and I'd test the modulus of that day number divided by 7 to get the day of the week: Given you have $yearnum $monthnum $daynum as input, you want a dayname out of the array @monthdays defined below. Here's my untested [away from perl at moment]