On Fri, 14 Mar 2003, John W. Krahn wrote:

> Christopher M Burger wrote:
> >
> > I was wondering if anyone could help me.  Here is my question.
> >
> > I have a date 03242003 I want it to look like 03/24/2003 how do I do that?
> >
> > Appreciate any help.
>
> my $date = '03242003';
>
> $date = join '/', unpack 'a2a2a4', $date;

Excellent.
I had skimmed through pack and unpack, but there were no
important uses that I could find.  So, I didn't pay much
attention to them.

The above example has made me think twice.

I'm going through them right away!!

Thanks John.

bye,
George P.

>
> Or:
> $date =~ s,(?<=\d\d)(\d\d),/$1/,;
>
> Or:
> substr( $date, 4, 0, '/' );
> substr( $date, 2, 0, '/' );
>
>
>
> John
> --
> use Perl;
> program
> fulfillment
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to