Re: hashes and string

2002-12-01 Thread Rob Dixon
TECTED]> 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' =>

Re: hashes and string

2002-12-01 Thread Simas Mockevicius
Thanx, but i have writen my code (maybe huge, but :)... for (my $a = 0; $a < 24; $a++) { my $value = substr $hours_flags, $a, $a; $Hours->{$a} = $value; } :-) Symka. > $_ = "0000"; > @h{grep~s/^.$/0$&/,0..23} = /./g; > > I hope that works > > -- > To unsubscribe

Re: hashes and string

2002-12-01 Thread badchoice
$_ = "0000"; @h{grep~s/^.$/0$&/,0..23} = /./g; I hope that works -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: hashes and string

2002-12-01 Thread badchoice
$_ = "0000"; @h{0..23} = /./g; (no '00' keys) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

hashes and string

2002-12-01 Thread Simas Mockevicius
Hi, I have falowing situation: hash: my $Hours = { '00' => '1', '01' => '1', '02' => '1', '03' => '1', '04' => '1', '05' => '1', '06' => '1', ... '23' =