shoorick: (Default)
[personal profile] shoorick
Пробуем выполнить scalar($array_ref), где $array_ref — ссылка на массив:
#!/usr/bin/perl -w
use strict;
$\ = "\n";
$, = ': ';

my @array = qw(one two three);
my $array_ref = \@array;

print 'scalar @$array_ref', scalar @$array_ref;
print 'scalar  $array_ref', scalar  $array_ref;
Получаем:
scalar @$array_ref: 3
scalar  $array_ref: ARRAY(0x804db74)
Хотя всё в man prelref написано...

Profile

shoorick: (Default)
shoorick

December 2016

S M T W T F S
    1 23
45678910
11121314151617
18 19 2021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 21st, 2026 10:26 am
Powered by Dreamwidth Studios