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...
Kourtneykovac asked 18/11, 2022 at 11:30

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...
Maximilianus asked 1/6, 2020 at 20:42

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 ...
Burkett asked 12/3, 2016 at 9:13

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& . . .. ...
Tallman asked 21/2, 2012 at 6:26

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?
Shelving asked 28/4, 2010 at 16:58

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?
Fayalite asked 6/4, 2009 at 19:55

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...
Floriated asked 30/9, 2008 at 15:44
1

© 2022 - 2024 — McMap. All rights reserved.