in reply to The most annoying common way to get a string literal in Perl is...
I'm surprised that bareword came up as most unpopular. I know for a fact that there are a million and two Perl programmers that use unquoted strings when it comes to hashes and lists. This makes me wonder if perhaps using => as a comma operator and unquoted hash keys are not generally considered barewords. Example follows of course.
#!perl -w use strict; my %en2fr = ( one => 'un', two => 'deux', three => 'trois' ); # yes I realize there are better ways to grab the # hash values, this is for demonstration only :) print join( ', ', $en2fr{one}, $en2fr{two}, $en2fr{three} ), $/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The most annoying common way to get a string literal in Perl is...
by mojotoad (Monsignor) on Jun 17, 2004 at 07:37 UTC | |
|
Re^2: The most annoying common way to get a string literal in Perl is...
by Skeeve (Parson) on Jul 12, 2004 at 21:33 UTC |