Simas
Sorry if I'm too late, but:
my $hours;
my $hours_flags = "000000111111111111000000";
@$hours{'00' .. '23'} = split '', $hours_flags;
Cheers,
Rob
----- Original Message -----
From: "Simas Mockevicius" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 01, 2002 2:54 PM
Subject: hashes and string
> Hi,
>
> I have falowing situation:
>
> hash:
> my $Hours = {
> '00' => '1',
> '01' => '1',
> '02' => '1',
> '03' => '1',
> '04' => '1',
> '05' => '1',
> '06' => '1',
> ...
> '23' => '1', };
>
> and a string:
>
> my $hours_flags = "000000111111111111000000";
>
> hou can I fill up my hash ($Hours) with the values I have in the string,
> assuming that strings first symbol is a hash 00 key and so on? Any
> thoghts? I realy need it, time is tiking away :(
>
> Thanx,
> Symka.
>
> P.S. the string ($hour_flags) are taken from mysql database, so - always
> not the same:-(
>
>
>
> --
> 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]