Continuing on with my earlier Date formatting program I have run into an
'ugly' issue.

I have created a Date formatting hash table like so:
( this is the shortened version)

 $self->{DF_SPEC} = {
                        a       => '(Mon|Tue|Wed|Thu|Fri|Sat|Sun)',
                        A       =>
'(Monday|Tuesday|Wednesday|Thursday|Friday)',
                        b       =>
'(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)',
                        B       =>
'(January|February|March|April|May|June|July|August|September|October|November|December)',
                        c       => "$p_a $p_b $p_e $p_H:$p_M:$p_S CUT
$p_Y",
                        C       => '(\d){2}',
                        d       => '(\d){2}'
     }

Now the only way I have figured out how to access it is with this ugly
string:
 print "${%{$self{DF_SPEC}}}{'a'}\n";

The reason for the hash table is that I am hoping by searching the date
format string the user provides I can match up the letter in an expression
like %X directly to a key in the DF_SPEC hash...thats the plan anyways.  It
should eliminate the search-replace strings I started off writing.


Please won't someone help cure my ugliness ....you know what I mean ;)


-----------------------------------------
Craig Moynes
Internship Student
netCC Development
IBM Global Services, Canada
Tel: (905) 316-3486
[EMAIL PROTECTED]


Reply via email to