Skip to content

Comment on Every language fixes something - a DiGraph - just for funparent

Comments

Yes it can be confusing to a novice how Perl sigils work. Hence Larry Wall conceded this as an issue and so one of the reasons he went for invariant sigils in Perl6.

However there is logic in the madness. Perhaps Larry Wall/linguistic logic but none the less it does work! The best explanation i've see is the comment by "Matt S Trout" on devolving-sigils blog post (http://blog.fogus.me/2009/02/26/devolving-sigils/).

Below is the key sentence from mst comment:

  Actually, perl sigils don’t denote variable type 
  – they denote conjugation 
  – $ is ‘the’, @ is ‘these’, % is ‘map of’ or so 
  – variable type is denoted via [] or {}.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.