in reply to Re: Re: to perl or not to perl
in thread to perl or not to perl

I strongly disagree not using the implicite variables (mainly $_ and @_, but also @ARGV, ARGV, STDIN and STDOUT). Using them all the time adds needless clutter in your program, making it harder to find out what's going on. Do you really think:
@foo = grep {$_ =~ /qux/} @bar;
reads better than
@foo = grep {/qux/} @bar;
It doesn't mean you should always use implicite variables, far from that. But never using them is like writing shell scripts without using pipes.

-- Abigail

Replies are listed 'Best First'.
Re: Re: to perl or not to perl
by chumley (Sexton) on Jun 10, 2001 at 07:44 UTC

    I didn't mean that I *never* use implicit variables. But I still find there are many cases where I find that implicit variables do things I didn't expect.

    Yes, I understand that there are many ways they can make my code more concise and efficient. But I am also thinking of the people who may come after me and have to maintain my code. AFAIK I am the only Perl programmer at my workplace, so I try to keep things as explicit as possible.

    As I learn more about Perl I find myself using it more idiomatically.

    Chumley