Ronald Yacketta wrote:
> 
> I have a date string as such
> 
> Thu Dec 10 2001
> Tue Dec  8 2001
> Wed Dec  7 2001
> 
> I have two hashes created for day_of_week and month_of_year
> To get the numeric value for the month and week day #.
> 
> The problem I am having is getting the split right.
> I have
> My ($wday,$month,$mday,$year) = split (/ /);
> I know this is wrong seeing that I have more than
> One space between the month and the day of the month.
> 
> Could someone lend a hand to get this split correct?


The "correct" way is:

my ( $wday, $month, $mday, $year ) = split;

This will work if the date to split is in $_



John
-- 
use Perl;
program
fulfillment

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

Reply via email to