develooper Front page | perl.perl6.users | Postings from June 2018

Re: EVAL?

Thread Previous | Thread Next
From:
Todd Chester
Date:
June 14, 2018 05:59
Subject:
Re: EVAL?
Message ID:
3a58a256-b655-aa75-8252-d2c3b941b0f7@zoho.com
  ---- On Wed, 13 Jun 2018 15:23:56 -0700 yary <not.com@gmail.com> wrote 
----  > Pet peeve, "$RunSpecific" with the quotes on either side is 
exactly the same as $RunSpecific without the quotes. Perl isn't shell.
  >  > -y

Hi Yary,

Chuckle.  Missed one.  What??  Or two or three ...

This program that I have been converting from P5 to P6 has been
a real learning experience.  I been removing quotes, dots, parentheses,
reference pointers (you have to pass reference pointers to P5's
weird subroutine headers if you want to pass anything other than a
simple $ variable) ...

p5
       if ( ! -d "$dir" ) {}
       while ( slice ( "\n", "$WebStr" )) { my $Line = $_; }

p6
       if not $dir.IO.d.bool {}
       for  slice  "\n", $WebStr   ->  $Line { }

  and on and on and so forth.  I know a lot of them by heart now.

And yes, my P5 code could be cleaned up a bit too, but as
soon as I get this last one over into p6, I will be mostly
done with p5.  I figure the good habit learning effort will
be best put to p6

-T

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