[RndTbl] PHP undefined vars / array indices

Trevor Cordes trevor at tecnopolis.ca
Sat Jan 22 02:46:38 CST 2022

On 2022-01-19 Brian Lowe wrote:
> At the risk of adding fuel to a fire, I agree with this. I'm a Perl
> fan myself, and I always add "use strict;" to my code. I appreciate
> the compiler telling me that it hasn't seen "very_long_variab1e_name"
> before (did you notice I dropped the changed the "l" to a "1" in
> "variable"?)

That's the beauty of perl.  You use strict, I don't, Brad does, some
other guy doesn't.  Even better, you can use strict on a new project,
but disable it on an old project you don't want to change 20k lines for!
(I did try when strict came out, I really did!  Just couldn't take it!)

> > Regarding Perl6, totally agree it should have been "Perl++".  
> Perl 6 does have a new name now; it was renamed to "Raku" in October
> 2019: https:// www.raku.org.

Darn, I knew that somewhere in my brain!  I think I even wrote a
newsletter article about it years ago.  Doh.  Goes to show what kind of
name recognition Raku gets :-)

To me it will always be known as perl 6!

> > @var = map { condition ? yes : no } sort grep { /regexp/ } @var;  
> It looks neat and is nice and concise, but maintainable? Not so much.
> These days I shy away from doing that even in code I write for my own
> use.

Love it!  Map came out way late in my perl game so I'm still working it
into my brain-flow, but it allows for some amazing condensing of
foreach blocks.  It's actually easy to read if you know the secret:
start on the right.  Easier if you put a this above the line:
# pull out so-n-so entries, sort and change them in such-n-such a way

Don't see any problem with that!  How do you win putting that comment
above 20 lines of foreach block vs putting it above your crazy one map

The surprising thing to most people is the amount of development and
innovation perl5 experiences every year to this very day.  And the new,
crazy language-changing extras the CPAN people come up with is
shocking.  Check out the perl*delta man pages:
man perldelta / man 5321delta
find /usr/share/man/ | grep perl | grep delta | sort
You could waste a day playing with all the new features over the years
(and the often funny comments in said manpages).

Need a separate perl thread now!   :-)

More information about the Roundtable mailing list