3 ms·
No, that's fine, this is more like the `len()` function being called implicitly if the array is being passed to where a "scalar" value is expected. Like here:
by forgetfulness 3y ago
No, that's fine, this is more like the `len()` function being called implicitly if the array is being passed to where a "scalar" value is expected.
Like here:
sub some_function($) {
my $some_var = @_;
print("$some_var\n");
}
my @arr = (1, 2, 4, 7);
some_function(@arr);
This prints the length of the array.