On Fri 28 Sep 2001 01:37, "Abigail" <[EMAIL PROTECTED]> wrote:
> >
> > my $aref = [
> > - [ "fred", "barney", "pebbles", "bambam", "dino", ],
> > - [ "homer", "bart", "marge", "maggie", ],
> > - [ "george", "jane", "elroy", "judy", ],
> > + [ 'fred', 'barney', 'pebbles', 'bambam', 'dino', ],
> > + [ 'homer', 'bart', 'marge', 'maggie', ],
> > + [ 'george', 'jane', 'elroy', 'judy', ],
> > ];
>
> I find this "don't use double quotes if you can get away with single
> quotes" dogma that has cropped up recently quite infantile. Except
> for personal preference, which usually doesn't go further than peoples
> brains going into overload if they don't encounter a $ or @ between
> double quotes, I've yet to see any serious argument why you should
> commit time to stomping out double quotes.
>
> Instead of spending many keystrokes in using different kinds of quotes,
> why not change examples like this into showing techniques that *are*
> useful?
>
> my $aref = [
> [qw /fred barney pebbles bambam dino/],
> [qw /homer bart marge maggie/ ],
> [qw /george jane elroy judy/ ],
> ];
You took the words right out of my mouth. I was about to hit 'Reply' when I
decided to read the rest of the thread first.
As long as perl does not make my use of double quotes syntax errors I don't
care what the doc's state. I use double quotes *always* except when I do not
want interpolation explicitly, in order to be able to extend any constant
string with \n or the like.
What I *do* care about is consistency. Use whatever pleases you in a
consistent way and don't intermix single and double quotes just because the
shift key got in the way. (my @junk = ("month", 'year', q(blah), qq/bar/);)
(Abigail, this is OK in YAPH's though)
--
H.Merijn Brand Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 623 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/