in reply to strange syntax

The documentation explains it: perldata ... search for $#

Replies are listed 'Best First'.
Re^2: strange syntax (more ways to search for and find docs, grep.cpan.me)
by Anonymous Monk on Jun 16, 2015 at 23:39 UTC

    The documentation explains it: perldata ... search for $#

    Let see what all explain it [perldoc://"$#"] "$#" -> perlref   $aref->$#*; # same as $#{ $aref }

    Wow, what a horrible search engine, that it five pages of results

     [ddg://"$#" site:perldoc.perl.org] "$#" site:perldoc.perl.org -> more of same nonsense, wow

    hello http://grep.cpan.me/?q=\%24%23\w%2B+dist%3Aperl+ ->

    The Perl equivalent for this is C<$#myarray>. Set the highest index in the array to the given number, equivalent to Perl's C<$#array = $fill;>. RJ

    hello http://grep.cpan.me/?q=\%24%23\w%2B%20dist%3Aperl%20+dist=perl

    trigger for I<container magics>, i.e. it will for C<%ENV> or C<%SIG> but not for C<$#array>. perl-5.22.0/pod/perldata.pod $days{'Feb'} # the 'Feb' value from hash %days $#days # the last index of array @days The length of an array is a scalar value. You may find the length of array @days by evaluating C<$#days>, as in B<csh>. However, this isn't the length of the array; it's the subscript of the last elemen which is a different value since there is ordinarily a 0th element. Assigning to C<$#days> actually changes the length of the array. Shortening an array this way destroys intervening values

    hello http://search.cpan.org/grep?cpanid=RJBS&release=perl-5.22.0&string=\%24%23&i=1&n=1&C=0#pod/perldata.pod

    pod/perldata.pod 53: $#days # the last index of array @days 357:of array @days by evaluating C<$#days>, as in B<csh>. However, th +is 360:Assigning to C<$#days> actually changes the length of the array. 364:X<$#> X<array, length> 373: $#whatever = -1; 382: scalar(@whatever) == $#whatever + 1;

      Or one could, as toolic suggests, actually look at perldata and search for the string '$#', which yields

      The length of an array is a scalar value. You may find the length of
      array @days by evaluating $#days, as in csh. However, this isn't the
      length of the array; it's the subscript of the last element ...
      as the second hit, followed by a few more informative paragraphs.


      Give a man a fish:  <%-(-(-(-<

        Or one could, as toolic suggests, actually look at perldata and search for the string '$#', which yields

        Hmm, an exercise in using available search methods ... to see the available ways one could stumble upon the same information toolic offered ... you understand this is what I presented right ? A different path to the information toolic presented?