60 PerlMonks - Newest Nodes New nodes appearing on PerlMonks http://perlmonks.org/~monkads/index.pl?node_id=30175 http://blogs.law.harvard.edu/tech/rss PerlMonks Newest Nodes XML Generator 20200331231020 http://perlmonks.org/ 961 clean,rss PerlMonks 2020-04-01 09:10:20 Tue Mar 31 23:10:20 2020 Tue Mar 31 23:10:20 2020 30 Anonymous Monk PAR::Packer/pp and die/exit JTAGGuy http://perlmonks.org/~monkads/index.pl?node_id=11114889 Hi, I have several applications using a function sub DieWithCode { my $numerical_exit_code = shift; my $msg = shfit; # do something with $msg (inserting application name, linebreaks...... perlquestion Wed, 01 Apr 2020 08:14:16 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114889 11114889 11114880 2020-04-01 04:14:16 JTAGGuy Re: Grab username from WP Cookie bliako http://perlmonks.org/~monkads/index.pl?node_id=11114892 not WP-specific but wouldn't one usually store a session-id (a long random string) into a cookie and then each page you navigate to asks for the cookies, extracts that session-id, and enquires the ... note Wed, 01 Apr 2020 08:54:53 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114892 11114892 1165397 2020-04-01 04:54:53 bliako Re: Building ARRAY with grep expression NOT working bliako http://perlmonks.org/~monkads/index.pl?node_id=11114891 if($String =~ '<a href="?node=%5E%2F">^/</a>*\.js') this is not wrong at all but just to clarify that the use of single quotes as regex delimiter is special in that it does not interpolate any variables inside th... note Wed, 01 Apr 2020 08:45:14 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114891 11114891 1165397 2020-04-01 04:45:14 bliako Re: PAR::Packer/pp and die/exit Anonymous Monk http://perlmonks.org/~monkads/index.pl?node_id=11114890 <a href="http://perldoc.perl.org/functions/caller.html">caller</a> search: <a href="?node_id=3989;BIT=par%20who%20am%20i%20.txt;HIT=Par">?node_id=3989;BIT=par%20who%20am%20i%20.txt;HIT=Par</a> <a href="?node_id=11105364">Re: killing pp exe on windows leaves child running? ( IsParParentAlive ppsimple.pl ppautolink.pl )</a>... note Wed, 01 Apr 2020 08:34:37 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114890 11114890 961 2020-04-01 04:34:37 Anonymous Monk Re^2: declaring lexical variables in shortest scope: performance? bliako http://perlmonks.org/~monkads/index.pl?node_id=11114888 fine with all these but if there is a long loop, then every little flop counts.... note Wed, 01 Apr 2020 08:13:35 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114888 11114888 1165397 2020-04-01 04:13:35 bliako Re^2: Building ARRAY with grep expression NOT working Anonymous Monk http://perlmonks.org/~monkads/index.pl?node_id=11114887 There's no need for a main() sub here so I've removed that. The script will run fine without it. pointless distractin... note Wed, 01 Apr 2020 08:03:30 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114887 11114887 961 2020-04-01 04:03:30 Anonymous Monk Re^4: Building ARRAY with grep expression NOT working Anonymous Monk http://perlmonks.org/~monkads/index.pl?node_id=11114886 ... and ...; <a href="?node=download">download</a> in place of ... if ...; <a href="?node=download">download</a> is a sneaky use of a logical operator and short circuit evaluation that is more appropriate to golf than production code. ... note Wed, 01 Apr 2020 08:01:41 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114886 11114886 961 2020-04-01 04:01:41 Anonymous Monk Re: declaring lexical variables in shortest scope: performance? eyepopslikeamosquito http://perlmonks.org/~monkads/index.pl?node_id=11114885 Don't diddle code to make it faster -- find a better algorithm -- ... note Wed, 01 Apr 2020 07:56:39 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114885 11114885 176576 2020-04-01 03:56:39 eyepopslikeamosquito Re: declaring lexical variables in shortest scope: performance? dsheroh http://perlmonks.org/~monkads/index.pl?node_id=11114884 Perl is not, never has been, and almost certainly never will be a "high performance" language. If you're really that concerned about saving every flop, your first move should not be to question where... note Wed, 01 Apr 2020 07:46:06 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114884 11114884 163790 2020-04-01 03:46:06 dsheroh Re^3: Building ARRAY with grep expression NOT working GrandFather http://perlmonks.org/~monkads/index.pl?node_id=11114883 open ... or ... is Perl idiom and completely acceptable. ... and ...; in place of ... if ...; is a sneaky use of a logical operator and short cir... note Wed, 01 Apr 2020 07:29:53 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114883 11114883 461912 2020-04-01 03:29:53 GrandFather Re^2: Grab username from WP Cookie htmanning http://perlmonks.org/~monkads/index.pl?node_id=11114882 This is on a private server with no risk of data loss. It's a very simple reservations system and I'm trying to use the Wordpress login instead of making people login again. I just need the username... note Wed, 01 Apr 2020 07:28:41 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114882 11114882 445135 2020-04-01 03:28:41 htmanning Re^2: Building ARRAY with grep expression NOT working Tux http://perlmonks.org/~monkads/index.pl?node_id=11114879 I've used postfix versions of unless and for to reduce the number of indented blocks. Which makes it harder for some (me) to read the code. The reason I answer is not becau... note Wed, 01 Apr 2020 06:08:31 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114879 11114879 200365 2020-04-01 02:08:31 Tux Re^2: How can one merge multiple excel files sheet-wise? supriyoch_2008 http://perlmonks.org/~monkads/index.pl?node_id=11114878 Hi roboticus, Thank you for your suggestions. I shall learn how to use hash and try to sort out the problem. With regards, ... note Wed, 01 Apr 2020 05:46:54 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114878 11114878 942579 2020-04-01 01:46:54 supriyoch_2008 Re^4: How install multiple version of perl swl http://perlmonks.org/~monkads/index.pl?node_id=11114877 Thanks. I'd forgotten about the recent work to support other perls. The OP noted a range from 5.6 to 5.24. I assume they still have the installers, as ActiveState stopped distributing t... note Wed, 01 Apr 2020 03:47:46 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114877 11114877 1171030 2020-03-31 23:47:46 swl Re^3: How install multiple version of perl swl http://perlmonks.org/~monkads/index.pl?node_id=11114876 That's correct. My, perhaps out of date, understanding was that the original repo was still used. It has commits on master up to v1.30, and the installer link points to stevieb's repo. <a href="?node=stevieb">stevieb</a>... note Wed, 01 Apr 2020 03:38:55 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114876 11114876 1171030 2020-03-31 23:38:55 swl Re: declaring lexical variables in shortest scope: performance? Anonymous Monk http://perlmonks.org/~monkads/index.pl?node_id=11114875 "Performance ..." (sic) "Don't borrow trouble. Whether-or-not you can measure it, if it ain't seriously hurtin' you, it doesn't exist."... note Wed, 01 Apr 2020 03:37:28 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114875 11114875 961 2020-03-31 23:37:28 Anonymous Monk Re: How install multiple version of perl kcott http://perlmonks.org/~monkads/index.pl?node_id=11114874 G'day <a href="?node_id=773026">maria80e</a>, To answer your first question: yes, this is entirely possible. I'm running Win10 and currently have five Perls installed: ActivePerl 5.16.3; Strawberry P... note Wed, 01 Apr 2020 03:21:26 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114874 11114874 861371 2020-03-31 23:21:26 kcott JTAGGuy JTAGGuy http://perlmonks.org/~monkads/index.pl?node_id=11114880 Computer Science Engineer, System Engineering Low-level software based hardware testing and validation, JTAG ... user Wed, 01 Apr 2020 07:28:22 +0000 http://perlmonks.org/~monkads/index.pl?node_id=11114880 11114880 11114880 2020-04-01 03:28:22 JTAGGuy