I cant figure out why this doesnt work...
I can't figure ou what you are trying to do.
while (EXPR) { ... } do (EXPR) { ... }
is not even close to valid Perl. I think you need to reread perlsyn before proceeding.
Also, you should use $data{key}, not @data{key}.
@data{value} != "" || null
is also quite wrong.
Fix the sigil:
$data{value} != "" || null
Use ne for string comparisons:
$data{value} ne "" || null
You can't do $var == value || value. It needs to be expanded to $var == value || $val == value:
$data{value} ne "" || $data{value} == null
The logic makes no sense. Fixed:
$data{value} ne "" && $data{value} != null
Use defined to check if something is not null: (It's called undef in Perl.)
$data{value} ne "" && defined($data{value}
You need to check defined first to avoid a warning:
defined($data{value}) && $data{value} ne ""
In reply to Re: Testing Hash Arrays
by ikegami
in thread Testing Hash Arrays
by Snowman11
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |