Added: 4 years ago
From: bermnz
Views: 27,819
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (19)

Sign In or Sign Up now to post a comment!
  • Yes. You can write $numWords = @words;

    print $numWords;

    and it will return 4.

  • Remember, you can also get the number of elements in an array by treating the array variable as a scalar. You don't have to use "@#array + 1".

  • thanks man

  • I think a pop-filter might help

  • Nice Tutorial! THX

  • it would be a lot beta if all the tutorial were on here tho

  • They were but YouTube don't accept me for partner program so having them here gives me little and donations at my site for them are few and far between, so what can I do?

  • @bermnz

    this is gr8 stuff... youtube is very stupid they have partners who post nothin but junk...

  • this is a gr8 tutorial

  • Thanks!

  • thanks for the tut...what's the software being used to run the perl program?

  • wait,in the second print,you wanted to show an array witch is the @ icon but you puted the $ icon but there where no error!!

    what the hell is going on???

  • agree!

  • its the way it works.

  • in first PRINT stmt he was showing you the full array at the output

    but the second print stmt he was refering to the index entries of the array; & you might know that arrays in return hold simple variables (: ... thats y "$" was used !!

  • It's because $numbers is a scalar reference to the @numbers array.

    In fact, Perl automaticaly assign reference when an array is created.

    You can make your own reference with : $ref = \@array;

  • I love your tutorials. If i read right.. your from NZ? Thats very cool i lived there for 2 years.

  • thanks

  • thank you for all your video on perl are educational and very easy to perceive. thank you sir.

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more