better hachage
am 23.08.2007 23:17:54 von john.swilting
I know this type of writing.
which is the best style
#!/usr/bin/perl -w
use strict;
use warnings;
my %Conf = (
XferMethod => "rsync",
XferLogLevel => "1",
RsyncShareName => "___1___",
ClientNameAlias => "___2___"
);
Re: better hachage
am 24.08.2007 03:31:43 von Tad McClellan
john.swilting wrote:
> which is the best style
>
> #!/usr/bin/perl -w
#!/usr/bin/perl
> use strict;
> use warnings;
Lexical warnings are better than the -w switch.
> my %Conf = (
> XferMethod => "rsync",
> XferLogLevel => "1",
> RsyncShareName => "___1___",
> ClientNameAlias => "___2___"
> );
my %Conf = (
XferMethod => 'rsync',
XferLogLevel => '1',
RsyncShareName => '___1___',
ClientNameAlias => '___2___'
);
Double quotes give you 2 things beyond what single quotes give you,
variable interpolation and backslash escapes.
It is misleading (ie. bad style) to use double quotes when you are
not making use of one of those two things.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"