develooper Front page | perl.perl5.porters | Postings from August 2009

Re: [DOC] Modernization: perldata

Thread Previous | Thread Next
From:
Ben Morrow
Date:
August 30, 2009 03:03
Subject:
Re: [DOC] Modernization: perldata
Message ID:
20090830100303.GA41029@osiris.mauzo.dyndns.org
Quoth polettix@gmail.com (Flavio Poletti):
> 
> -    $who = "Larry";
> -    print PASSWD "${who}::0:0:Superuser:/:/bin/perl\n";
> +    my $who = "Larry";
> +    print $passwd_fh "${who}::0:0:Superuser:/:/bin/perl\n";

(I'm being picky again, and I don't like it. Please tell me to stop when
it gets annoying.)

I usually stick to the convention of using uppercase for filehandles,
even when they're in variables. It just helps visually distinguish them.
I'd write this

    print $PASSWD "...";

Ben


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About