To use things such as "ceil/floor", I need to "use POSIX"... Aren't they basic?

Group functions into modules/classes is a good thing. (Granted, "POSIX" is not a good grouping.)

In Python, you must do

import math math.floor( x )

So why do you complain that the following is onerous?

use POSIX; floor($x)

It is strongly recommended to "use strict" and make variables "my", then why it is not default?

It is in version 5.12 of the language.

Before 5.10, Perl didn't really have a way of specifying a minimum language version, so it was tied by backwards compatibility.

If in subroutine I can write "$_ = shift", why can't I write so in main (I need to write "$_ = shift @_").

A script's arguments are placed in @ARGV, so grabbing from there makes far more sense than grabbing from unpopulated @_ when outside of a sub.

Ruby's cho(m)p I like more, because I can proceed on string: gets.cho(m)p.split.do_smth...

1) chomp($foo); is more efficient than $foo = chomp($foo);.

2) chomp(@foo); is simpler than @foo = map chomp, @foo;.

Can't use blocks using "and/or":

Yes you can.

f() and do { ... };

"$hash{length}" it interpreted (length $_) as "length"

$hash{BAREWORD} is the same as $hash{'BAREWORD'}. Very useful. Making an exception for length would be bad (very error prone).

Surprise that "use bigint" doesn't DWIM in some cases.

Then you didn't read what it does. It promotes numerical constant literals to Math::BigInt objects.

Surprise was that ++ has magic (I need to know exceptions) and -- has not

I don't know if I'd say that "not treating abc as 0" is magic. As for --, I guess noone found a use for it.

Difficult exception is that "print (1+1)*2" != "print 2*(1+1)" == "print STDOUT (1+1)*2".

You're complaining about being given the option to omit parens around arguments. If you don't like being able to omit parens, then don't do it.

I think "print(..." should better wait until the end of block or ";".

Nonsense. You gotta be able to check the value print returns (e.g. print "foo\n" or die $!;).


In reply to Re: Opinion: where Perl5 wasn't attractive for me by ikegami
in thread Opinion: where Perl5 wasn't attractive for me by rsFalse

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.