user-pic

Ivan Bessarabov

  • Commented on Test::Whitespaces
    > There is also Test::NoTabs and Test::Tabs (mine) on CPAN. Great! Thank you! There was link to Test::NoTabs in the "SEE ALSO" section, I've added link to your module Test::Tabs https://github.com/bessarabov/Test-Whitespaces/commit/d40d2eb0acf0f68994a3a7f06cc2cde4a99c19c3...
  • Commented on Test::Whitespaces
    > Running the test script from the synopsis using prove doesn't output anything helpful Thank you for finding this issue! You will certainly see information about errors if you run `prove -v t/Whitespace.t`. I'm not sure if there should be...
  • Commented on Test::Whitespaces
    > It doesn't check for code formatting, but Test::EOL and Dist::Zilla::Plugin::EOLTests checks for trailing whitespaces and for tabs. Thank you Ether. Yes, Test::Whitespaces works on the same problem as Test::EOL. And Test::EOL is in the "SEE ALSO" section of Test::Whitespaces...
  • Commented on Test::Whitespaces
    > Isn't Perl::Tidy a better choice for this? You can also make Perl::Critic check the tidiness... Yes, you are 100% correct. Perl::Tidy and Perl::Critic can solve some whitespaces errors. Test::Whitespaces has this advantages: Test::Whitespaces is much easier than Perl:Tidy and...
  • Posted Test::Whitespaces to Ivan Bessarabov

    Perl is very flexible in may ways including whitespaces. Perl does not force you to use tab or spaces. The script works fine no matter if it has DOS or UNIX line breaks.

    But there are some good practices. I preffer these rules:

    • every line ends with "\n" (including the last li…
  • Commented on Perl Calltrace
    Or lib::abs http://search.cpan.org/perldoc?lib::abs...
  • Commented on $#boo
    I personally sometimes use `scalar @foo` and sometimes `$#foo`, because it return different values: my @foo = 1..3; say scalar(@foo); # 3 say $#foo; # 2...
  • Commented on $#boo
    Yes, the `#` is the Number Sign, but this is not a great explanation. $#boo means last element index, not the numbers of elements....
  • Posted $#boo to Ivan Bessarabov

    As we all know $#boo returns the last index of array @boo.

    It is clear why we have the prefixes '$' and '@' ('$' is like the first
    letter of the word 'scalar' and the '@' is like the first letter of the word
    'array').

    But is it unclear why there is '#' after the dollar …

Subscribe to feed Recent Actions from Ivan Bessarabov

  • Joel Berger commented on $#boo

    Sorry Ivan, that was just a quick post before I left for work this morning. Had I had more time I would have mentioned that I have thus always taken the the `$#` prefix to read as 'the scalar number of the array'. I wasn't sure, given your name and location, if you were aware of the English language meaning of the symbol. Since it appears that you are, and that you are looking for something more exactly to do with the origins of Perl, I can't help. Good luck, I like little curios of this sort.

  • jrw32982 commented on $#boo

    The reason: that's the way it is in the shell.

Subscribe to feed Responses to Comments from Ivan Bessarabov

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.