sigils Questions
2
Solved
Raku sigils denote the nature of the underlying variable (e.g., $scalar, @positional, %associative, &code).
It's possible to declare a variable as sigil-less with a backslash (e.g., \some-varia...
2
Solved
I sometimes see code that (to me) uses the wrong sigil in front of the variable
my $arr = [1, 2, 3, 4, 5]; # an array
my $lst = (1, 2, 3, 4, 5); # a list
my $hash = {a => '1', b => '2'}; # a...
1
Solved
I came across this, expecting it to be a typo for $@:
use strict;
use warnings;
eval {
my $error = Not::Here->new();
};
warn @$;
And to my surprise it outputs this:
Can't locate object ...
2
Solved
I just got a bunch of legacy VB6 (!) code dumped on me and I keep seeing functions declared with an ampersand at the end of the name, for example, Private Declare Function ShellExecute& . . .. ...
1
Solved
Is there something I can't do without the '@'-sigil when working with user-defined variables?
#!perl6
use v6;
my $list = <a b c d e f>;
my @list = <a b c d e f>;
$list.list.perl.say;...
Architectonics asked 18/2, 2011 at 8:4
5
What is the difference between $this, @that, and %those in Perl?
4
Is it possible to name variables in a Java-like manner in PHP, such as by removing the need for a $ sign each time? If so, how can I enable the setting which does this?
9
Solved
Since arrays and hashes can only contain scalars in Perl, why do you have to use the $ to tell the interpreter that the value is a scalar when accessing array or hash elements? In other words, assu...
1
© 2022 - 2024 — McMap. All rights reserved.