From jacoby at purdue.edu Tue Sep 4 10:18:45 2018 From: jacoby at purdue.edu (Dave Jacoby) Date: Tue, 4 Sep 2018 13:18:45 -0400 Subject: [Purdue-pm] This has to be a thing in sed or something that I just didn't know, right? In-Reply-To: <19356.1535757341@pier.ecn.purdue.edu> References: <19356.1535757341@pier.ecn.purdue.edu> Message-ID: <523a23e9-2466-7845-ca7b-30c72be64109@purdue.edu> Thanks for that. I hit the point where it was simpler for me to write the thing than continue to wonder "Can grep do that? awk? sed? Something else?" But good to know that yes, it's in there. On 08/31/2018 07:15 PM, Mark Senn wrote: >> crontab -l | match -r '([\w\.\/]*.pl)' > > Tested using GNU grep 2.20 and 3.1: > crontab -l | grep -oP '[\w./]*\.pl' > > -mark > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > https://mail.pm.org/mailman/listinfo/purdue-pm > From mark at purdue.edu Tue Sep 11 06:23:51 2018 From: mark at purdue.edu (Mark Senn) Date: Tue, 11 Sep 2018 09:23:51 -0400 Subject: [Purdue-pm] Perl 6 Message-ID: <6832.1536672231@pier.ecn.purdue.edu> A good Perl 6 Resources web page is at https://perl6.org/resources A good summary of Camel, Hungarian, Kebab, and Snake variable naming conventions is at http://www.wellho.net/mouth/4611_Hungarian-Camel-Snake-and-Kebab-variable-naming-conventions.html Perl 6 allows kebab case variables like $number-of-people (get it?, shish kebab), which for me is much easier to type and read than the snake case $number_of_people. (I started using kebab case when taking a COBOL class at Purdue in the late 1970s and developed a fondness for it then.) In real life I'd name this $np if the program where just about people or $npeople if the program had more than one variable name that started with "p". A long time ago I started using camel case for names of subs I write like Cos, ArcCos, and ReverseColorMap. The bigger a program is the longer I like to make variable names. And if others will be looking at the program I am more likely to use longer variable name. From http://sixfix.nigelhamilton.com SixFix is a weekly email with something new to learn about Perl 6. But there's a catch! Each email includes a coding challenge and a question about Perl 6 you must answer to receive your next SixFix. I've only done the first exercise but I recommend it. Mark Senn, Systems Programmer, Engineering Computer Network, Purdue University From mark at purdue.edu Mon Sep 17 06:12:58 2018 From: mark at purdue.edu (Mark Senn) Date: Mon, 17 Sep 2018 09:12:58 -0400 Subject: [Purdue-pm] (no subject) Message-ID: <18304.1537189978@pier.ecn.purdue.edu> Perl 6 is Perl 5 redesigned and rewritten from the ground up but it still feels like programming in Perl 5. In my opinion, Perl 6 is a much better language than Perl 5---Perl 5 is more mature now but if Perl 6 has all the packages you need I suggest you start using it to get familar with it. An easy-to-read, description of "How subroutine signatures work in Perl 6" for beginners is available at https://opensource.com/article/18/9/signatures-perl-6 It's easy to read, not too long, and covers basic knowledge one needs to define their own Perl 6 subroutines. For me, the best way to learn Perl 6 has been by reading articles like the above. The knowledge is bite-sized, gives you enough to do simple things, but doesn't cover all the material a reference manual does. Perl 6 is powerful---it is hard to try and learn everything at once. -mark