in reply to Re: Sort and related stuff
in thread Sort and related stuff

$#list_name returns the index number of the last element in @list_name. This will give you an off-by-one error if you try to use it to count the number of elements in an list (so use $count = @list_name for that). Also useful for erasing a list: $#list_name = -1;

See perldoc perldata for more information.
  • Comment on (ichimunki) re: What does # do in a variable name?