Date: 2013-03-16 12:02 am (UTC)
Десятилетней давности - это был скрипт, с которым я мучался вчера (это проект-однодневка).

А вот для VerilogPerl я использовал все самое свежее.

У меня сложилось впечатление, что на перле трудно специфицировать структуры данных типа деревьев, массивов структур из массивов структур и т.д. То есть я это выучил как подмножество, но за пределы подмножества не понимаю, как ступать, а превращать жизнь в изучение перла не хочу, ибо занимаюсь другими вещами.

Исключение, которое меня реально шокировало:


http://community.activestate.com/faq/perls-magic-sort-variable

Question:
When I call my variables $a or $b they don't do what I expect. What's up?

Answer:
Here's an often-used, but little-remembered fact about Perl that has caused some confusion on more than one occasion: $a and $b are special.

They are (among other things) used in custom sort blocks, but unfortunately the Perl documentation uses them in many examples. I say that it is unfortunate because the use strict pragma seems to ignore these two variables. If you do the following:

use strict;

$a = "foo";
$b = "bar";
$c = "baz";
$d = "quux";
You will see that only $c and $d are flagged as errors.

My advice is to avoid using $a and $b except for custom sort blocks and other places that require their use.

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at [email protected]

Profile

vit_r: default (Default)
vit_r

July 2025

S M T W T F S
   12345
6789101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 2nd, 2025 02:07 pm
Powered by Dreamwidth Studios
OSZAR »