Re: распечатка хэша

From
Roman V Tchemisov (2:5020/400)
To
Victor Sudakov (2:5054/37.63)
Date
2005-04-19T15:04:16Z
Area
RU.PERL
From: "Roman V Tchemisov" <tpyc@rol.ru>

Привет, Victor

>> Если что-то непонятно -- делай use diagnostics; и будет тебе счастье.

> Вставил "use diagnostics" - ничего не изменилось.

Странно. Тогда не знаю (c). Я думал будет что-то вроде:

Scalar value @hash{123} better written as $hash{123} at /home/kinjo/at.pl  
line 6 (#1)
     (W syntax) You've used a hash slice (indicated by @) to select a single
     element of a hash.  Generally it's better to ask for a scalar value
     (indicated by $).  The difference is that $foo{&bar} always behaves
     like a scalar, both when assigning to it and when evaluating its
     argument, while @foo{&bar} behaves like a list when you assign to it,
     and provides a list context to its subscript, which can do weird things
     if you're expecting only one subscript.

     On the other hand, if you were actually hoping to treat the hash  
element
     as a list, you need to look into how references work, because Perl will
     not magically convert between scalars and lists for you.  See
     perlref.

Удачи.
-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
--- ifmail v.2.15dev5.3
 * Origin: OOO "TD RSP-Irkutsk" (2:5020/400)
SEEN-BY: 50/203 520 400/462 450/159 186 208 451/30 452/25 100 454/9 455/15
SEEN-BY: 461/33 43 74 106 132 640 464/34 465/204 467/24 469/125 200 999 478/44
SEEN-BY: 478/65 550/150 5068 4600/126 4614/9 4616/3 4623/56 4625/8 9 4626/100
SEEN-BY: 4627/10 4632/10 4635/4 99 1024 4641/444 4642/27 48 4657/50 5000/76
SEEN-BY: 5001/50 5001 5002/76 5002 5003/34 5006/1 5007/1 5010/53 70 146
SEEN-BY: 5011/13 5012/8 5015/4 28 214 5019/5 5020/52 115 118 128 133 150 154
SEEN-BY: 5020/175 194 400 486 545 549 600 642 715 744 758 794 830 921 958 968
SEEN-BY: 5020/982 1057 1100 1169 1212 1234 1523 1604 1626 1642 1653 1665 1826
SEEN-BY: 5020/1829 1922 1930 2013 2020 2044 2142 2200 2238 2345 2590 2908 4400
SEEN-BY: 5020/4441 5021/2 3 5022/128 5023/11 5024/1 73 5025/19 750 5026/14 49
SEEN-BY: 5030/49 69 195 382 436 556 611 920 966 1016 1039 1063 1339 1520 1688
SEEN-BY: 5030/1900 5031/7 47 63 70 5032/11 20 5033/21 35 5034/8 5035/3 38 63
SEEN-BY: 5036/1 13 5037/21 36 5038/4 5040/33 47 5041/4 5042/13 5045/7 42
SEEN-BY: 5047/47 5049/1 6 157 5050/9 41 5051/15 35 5053/16 38 5054/1 8 9 35 36
SEEN-BY: 5054/37 45 50 66 67 81 85 5055/177 5056/16 5057/1 5058/77 5059/2 9 20
SEEN-BY: 5060/88 90 5061/15 5062/1 4 7 5063/41 51 5064/7 35 36 39 5066/18
SEEN-BY: 5070/26 66 948 1222 5071/22 5075/5 37 5077/70 80 5079/49 5080/80 1003
SEEN-BY: 5081/2 5082/6 5083/13 21 5090/23 105 108 113 5093/4 27 33 5096/18
SEEN-BY: 5100/113 6001/3 6023/1 6033/2727 6035/9 6070/5 6083/11 6096/10
PATH: 5020/400 4441 52 5054/1 37