Re: Month-Year Links....

2004-09-07 Thread Gunnar Hjalmarsson
Rob Hanson wrote: One note... if you have a daylight savings time that takes effect between 11pm and 1am this won't work. In the US DST is 2am, so it is safe. Also, this might be a prettier solution... use Time::Local; use constant DAY => 86_400; $current = time; $previous = subtract_month(time, 1

RE: Month-Year Links....

2004-09-07 Thread Hanson, Rob
One note... if you have a daylight savings time that takes effect between 11pm and 1am this won't work. In the US DST is 2am, so it is safe. Also, this might be a prettier solution... use Time::Local; use constant DAY => 86_400; $current = time; $previous = subtract_month(time, 1); $current_2 =

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Gunnar Hjalmarsson
Chris Welch wrote: Right the deal is thus - if I am getting the wrong end of the stick, feel free to beat me over the head with said stick. Okay, I'll see what I can do. :) I have a form and someone submits weird stuff that probably shouldn't be in there (but you never know.) This has to be writte

RE: Month-Year Links....

2004-09-07 Thread Hanson, Rob
The trick is to use Time::Local to find the first day of the month, then subtract 1 day. This prints: 09-2004 08-2004 07-2004 ### use Time::Local; use constant DAY => 86_400; $current = time; $previous = first_day($current) - DAY; $current_2 = first_day($previous) - D

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Chris Welch
On Tue, 07 Sep 2004 22:43:10 +0200, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > [ Please type your reply *below* the quoted part of the message you > are replying to. ] > > Chris Welch wrote: > > Gunnar Hjalmarsson wrote: > >> Chris Welch wrote: > >>> I have a dilemma, I am processing CGI form

Month-Year Links....

2004-09-07 Thread Greg Schiedler
Perl v5.6.1 Trying to easily create some variable based on the current month and links to the two previous months. The filename(s) are based on two digit months MM--Filename. I have the filename part working but I need some guidancd on creating the MM-. I have seen many perl modules t

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Gunnar Hjalmarsson
[ Please type your reply *below* the quoted part of the message you are replying to. ] Chris Welch wrote: Gunnar Hjalmarsson wrote: Chris Welch wrote: I have a dilemma, I am processing CGI forms and I need to come up with a regex that will accept HTML entities (i.e., " or {), Your description makes

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Chris Welch
Basically I am going to turn some funny characters into HTML entities using the aforementioned HTML::Entities so I can display them in a HTML page. I therefore need to accept them, but also the other chars. I don't want to allow people posting dodgy stuff that is going to be damaging... As far as

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Gunnar Hjalmarsson
Chris Welch wrote: I have a dilemma, I am processing CGI forms and I need to come up with a regex that will accept HTML entities (i.e., " or {), Your description makes me fear that you are somewhat off track. *Why* would you need such a regex? If you explain more about the context, it would be easi

RE: Regex for accepting text and HTML *entities*

2004-09-07 Thread Bob Showalter
Chris Welch wrote: > Hi, > > I have a dilemma, I am processing CGI forms and I need to come up with > a regex that will accept HTML entities Have a look at the HTML::Entities module source code for regexes. If you're just trying to decode entities, use this module instead of rolling your own. ht

Regex for accepting text and HTML *entities*

2004-09-07 Thread Chris Welch
Hi, I have a dilemma, I am processing CGI forms and I need to come up with a regex that will accept HTML entities (i.e., " or {), white space, some other chars and text... The regex I've come up with is flawed: m/^&#?\w{2,4};|[EMAIL PROTECTED],\(\)\/\[\]:;\?!]+$/g; This will match and ampersand

HELLLLLP! COOKIES ARE DRIVING ME INSAAAAAAAAAAANE!

2004-09-07 Thread Ron Goral
Howdy - I'm having some trouble deleting a cookie using CGI::Cookie. Here is the code I'm using to do this. Note this is in a module, so I have written wrappers for the CGI::Cookie Set/Get functionality. However, this is test code, so it's being accessed in it's own namespace. I know that this