On 21/02/2012 19:57, Shlomi Fish wrote:
Hi,

On Tue, 21 Feb 2012 23:47:39 +0400
Vyacheslav<agapov.sl...@gmail.com>  wrote:

Hello.

I'm new in perl and have many questions.

This my first programm.

#!/usr/bin/perl

use strict;
use warnings;


That's good.

my $number = 0;
my $_ = 0;

You shouldn't use my with "$_" and you should avoid using $_ in serious
programs as much as possible because it can get devastated too easily.

print "Enter number:";

An English typo "Enter number" should be "Enter a number".

Shlomi your comments are generally finicky but this is inexcusable.

The OP is a Perl beginner, and is hardly likely to be writing 'serious
programs'. Larry designed $_ to make Perl more natural and fluid, and
avoiding it for all but the most complex of applications is to deny much
of what Perl is very good at.

There is no reason to require an article in an English phrase, and if we
are to follow your guidance then we mustn't ever say "I like cheese".
You are surely used to prompts like "Enter password", or even simply
"Password"?

You often seem to me to be flexing the biceps of your programming
knowledge, and I think you should remember that that is usually
detrimental to anything you could teach.

Rob



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to