Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The other problem is the frustrating learn curve of Perl, because we have a list form and a ref form of an array.

No, we have plain variables and references to variables (and functions). The distinction between plain and reference variables is well done IMHO.

But python is worse - it has list and tuple arrays

qwurx [shmem] ~> python Python 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> foo = (1,2,3,4) >>> bar = [1,2,3,4] >>> type(foo) <type 'tuple'> >>> type(bar) <type 'list'> >>> bar[0] = 5 >>> foo[0] = 5 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'tuple' object does not support item assignment >>> foo (1, 2, 3, 4) >>> bar [5, 2, 3, 4] >>>

and it isn't obvious which is which by looking at the identifier. A tuple is inmutable, a list can be assigned to.
This was a major WTF moment for me.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

In reply to Re^2: Thx, St. Larry, for the Beauty of Sigils by shmem
in thread Thx, St. Larry, for the Beauty of Sigils by msouth

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-19 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found