Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Sigil (computer programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Historical context == The use of sigils was popularized by the [[BASIC programming language]]. The best known example of a sigil in BASIC is the [[dollar sign]] ("<code>$</code>") appended to the names of all [[string (computer science)|string]]s. Many BASIC dialects use other sigils (like "<code>%</code>") to denote [[integer]]s and [[floating-point number]]s and their precision, and sometimes other types as well. [[Larry Wall]] adopted [[shell script]]ing's use of sigils for his [[Perl]] programming language.{{citation needed|date=April 2018}} In Perl, the sigils do not specify fine-grained data types like strings and integers, but the more general categories of [[scalar (computing)|scalars]] (using a prefixed "<code>$</code>"), arrays (using "<code>@</code>"), [[hash table|hashes]] (using "<code>%</code>"), and [[subroutine]]s (using "<code>&</code>"). [[Raku (programming language)|Raku]] also uses secondary sigils, or '''twigils''',<ref>[http://doc.perl6.org/language/variables#Twigils "Perl 6 variables:Twigils"], Perl 6 Documentation.</ref> to indicate the scope of variables. Prominent examples of twigils in Raku include "<code>^</code>" ([[caret]]), used with self-declared formal parameters ("placeholder variables"), and "<code>.</code>", used with object attribute accessors (i.e., instance variables).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)