60 PerlMonks - Newest Nodes New nodes appearing on PerlMonks http://perlmonks.org/index.pl?node_id=30175 http://blogs.law.harvard.edu/tech/rss PerlMonks Newest Nodes XML Generator http://perlmonks.org/ PerlMonks Fri Dec 15 10:04:12 2017 961 20171215100412 2017-12-15 21:04:12 Anonymous Monk Fri Dec 15 10:04:12 2017 30 rss,clean Using PerlApp or PAR with modules with data dependenciess Anonymous Monk http://perlmonks.org/index.pl?node_id=1205604 Hello monks I am trying to pack into an executable (exe) a simple perl script containing a module with data dependencies. I am failing. I am working with ActiveState/PerlApp, but I would li... perlquestion Fri, 15 Dec 2017 16:59:47 +0000 http://perlmonks.org/index.pl?node_id=1205604 1205604 961 2017-12-15 11:59:47 Anonymous Monk Appconfig module question hveneticus http://perlmonks.org/index.pl?node_id=1205595 I have to read a configuration file that contains lines like these ones: VAR=/path/to/ AMB=cer DIRSKE=${VAR}${AMB} SCRIPT=${DIRSKE}/script.sh After a search, I found... perlquestion Fri, 15 Dec 2017 15:34:55 +0000 http://perlmonks.org/index.pl?node_id=1205595 1205595 1166628 2017-12-15 10:34:55 hveneticus sort HoH by second level values in specific order lener http://perlmonks.org/index.pl?node_id=1205589 Dear Monks, I have a Hash of Hashes, in which the first level contains the names of nodes and the second level contains values for their 'cores' and 'memory', it looks like this: $free_s... perlquestion Fri, 15 Dec 2017 15:18:28 +0000 http://perlmonks.org/index.pl?node_id=1205589 1205589 1205584 2017-12-15 10:18:28 lener Re: sort HoH by second level values in specific order Laurent_R http://perlmonks.org/index.pl?node_id=1205622 Hi <a href="?node=lener">lener</a>, this is basically the same idea as <a href="?node=poj">poj</a> (and reusing <a href="?node=poj">poj</a>'s input data), except that this does not bother to create an explicit temporary array: #!/usr/bin/perl use strict; ... note Fri, 15 Dec 2017 20:43:24 +0000 http://perlmonks.org/index.pl?node_id=1205622 1205622 992570 2017-12-15 15:43:24 Laurent_R Re: Using PerlApp or PAR with modules with data dependenciess marto http://perlmonks.org/index.pl?node_id=1205617 I've used <a href="https://metacpan.org/pod/pp">pp</a> many times over the years, you don't show how you tried to make the exe (see also <a href="?node_id=174051">How do I post a question effectively?</a>), but calling it with the -x option tends to resolve many of these pr... note Fri, 15 Dec 2017 19:06:58 +0000 http://perlmonks.org/index.pl?node_id=1205617 1205617 324763 2017-12-15 14:06:58 marto Re^3: RTFM!!!!! (but if you didn't, no biggie) marto http://perlmonks.org/index.pl?node_id=1205616 Perhaps you only "glanced at it"? This thread is amusing, nice to see you don't practice what you preach. We have a few regulars who exhibit this behaviour.... note Fri, 15 Dec 2017 19:02:13 +0000 http://perlmonks.org/index.pl?node_id=1205616 1205616 324763 2017-12-15 14:02:13 marto Re^3: Array Plus Operator AnomalousMonk http://perlmonks.org/index.pl?node_id=1205613 ... someone "fat-fingered" it... since the "+" and "&#91;" are so close on the keyboard... But "+" also requires a shift, so it would have to be a "hyper... note Fri, 15 Dec 2017 18:08:27 +0000 http://perlmonks.org/index.pl?node_id=1205613 1205613 634253 2017-12-15 13:08:27 AnomalousMonk Re^2: sort HoH by second level values in specific order lener http://perlmonks.org/index.pl?node_id=1205612 That's also a great answer. I've tried that first and it worked flawlessly. ... note Fri, 15 Dec 2017 17:52:56 +0000 http://perlmonks.org/index.pl?node_id=1205612 1205612 1205584 2017-12-15 12:52:56 lener Re^2: sort HoH by second level values in specific order lener http://perlmonks.org/index.pl?node_id=1205611 Thanks, that's an excellent answer. I wasn't aware that you can define your own complex sort routines.... note Fri, 15 Dec 2017 17:51:41 +0000 http://perlmonks.org/index.pl?node_id=1205611 1205611 1205584 2017-12-15 12:51:41 lener Re: Appconfig module question hveneticus http://perlmonks.org/index.pl?node_id=1205606 Even three interesting ideas! I'll try them ASAP. Many thanks, guys ... note Fri, 15 Dec 2017 17:23:08 +0000 http://perlmonks.org/index.pl?node_id=1205606 1205606 1166628 2017-12-15 12:23:08 hveneticus Re: Appconfig module question poj http://perlmonks.org/index.pl?node_id=1205605 As <a href="?node=Toolic">Toolic</a> suggested, pre-processing the file works #!/usr/bin/perl use strict; use AppConfig qw(:expand); use Data::Dump 'pp'; my $config = AppConfig->new({ CASE => 1, GLOBAL =... note Fri, 15 Dec 2017 17:07:23 +0000 http://perlmonks.org/index.pl?node_id=1205605 1205605 221725 2017-12-15 12:07:23 poj Re: RTFM ( How can we improve the FM? ) LanX http://perlmonks.org/index.pl?node_id=1205603 Seems it was more "What did you try and how did it fail?" than RTFM. Instead of answering <a href="?node_id=1205478">"I glanced at it"</a> you could have said something like... note Fri, 15 Dec 2017 16:59:34 +0000 http://perlmonks.org/index.pl?node_id=1205603 1205603 708738 2017-12-15 11:59:34 LanX Re: Appconfig module question karlgoethebier http://perlmonks.org/index.pl?node_id=1205602 "...using the correct module..." I don't know. But perhaps you can abuse another? Some untested stuff: #!/usr/bin/env perl use strict; ... note Fri, 15 Dec 2017 16:57:03 +0000 http://perlmonks.org/index.pl?node_id=1205602 1205602 1001958 2017-12-15 11:57:03 karlgoethebier Re^2: RTFM!!!!! (but if you didn't, no biggie) nysus http://perlmonks.org/index.pl?node_id=1205601 I read your manual. It was an easy read: "IGNORE ME." I don't always follow that advice. But when I do, it feels great. ... note Fri, 15 Dec 2017 16:26:50 +0000 http://perlmonks.org/index.pl?node_id=1205601 1205601 66801 2017-12-15 11:26:50 nysus Re: AppConfig module question toolic http://perlmonks.org/index.pl?node_id=1205600 As the POD for <a href="http://search.cpan.org/perldoc?AppConfig">AppConfig</a> states, the ${var} syntax will expand an environment variable. To expand a variable set in your file, you need to use the $(var) or $var syntax. ... note Fri, 15 Dec 2017 16:26:30 +0000 http://perlmonks.org/index.pl?node_id=1205600 1205600 622051 2017-12-15 11:26:30 toolic Re: perl, ssh and grep hveneticus http://perlmonks.org/index.pl?node_id=1205599 Yeah. The right way is to let perl doing the quoting... Thanks to everyone... note Fri, 15 Dec 2017 15:55:36 +0000 http://perlmonks.org/index.pl?node_id=1205599 1205599 1166628 2017-12-15 10:55:36 hveneticus Re: RTFM!!!!! (but if you didn't, no biggie) Anonymous Monk http://perlmonks.org/index.pl?node_id=1205598 think that spirit of gift giving and reciprocation is what makes PM such a great community and Perl such a great programming language. I will do my absolute best to carry on the tradition... note Fri, 15 Dec 2017 15:52:19 +0000 http://perlmonks.org/index.pl?node_id=1205598 1205598 961 2017-12-15 10:52:19 Anonymous Monk Re: sort HoH by second level values in specific order poj http://perlmonks.org/index.pl?node_id=1205597 Create an array in the output format you want and sort that. #!/usr/bin/perl use strict; my $free_space = { node3 => { cores => 11, mem => 200 }, node10 => { cores => 10, mem... note Fri, 15 Dec 2017 15:50:08 +0000 http://perlmonks.org/index.pl?node_id=1205597 1205597 221725 2017-12-15 10:50:08 poj Re: sort HoH by second level values in specific order 1nickt http://perlmonks.org/index.pl?node_id=1205596 See <a href="http://perldoc.perl.org/functions/sort.html">sort</a>, which demonstrates how to create a custom sort routine: use strict; use warnings; use feature 'say'; my $free_space = { node1 => { cores => 12, mem => 200 }, ... note Fri, 15 Dec 2017 15:45:24 +0000 http://perlmonks.org/index.pl?node_id=1205596 1205596 1130276 2017-12-15 10:45:24 1nickt Re^12: Who is your favorite scientist and why? james28909 http://perlmonks.org/index.pl?node_id=1205594 wouldnt that also make your post off topic? just wondering. also please explain how it is off topic. i am directly asking him to stop picking apart my beliefs and post his own.... note Fri, 15 Dec 2017 15:28:58 +0000 http://perlmonks.org/index.pl?node_id=1205594 1205594 1018106 2017-12-15 10:28:58 james28909 Re^12: Who is your favorite scientist and why? james28909 http://perlmonks.org/index.pl?node_id=1205593 most of these were answered in the chatterbox while you were here. i want to answer this one question, again. YES i am agnostic. i believe that there is no way to prove or disprove god (yet, let it an... note Fri, 15 Dec 2017 15:26:03 +0000 http://perlmonks.org/index.pl?node_id=1205593 1205593 1018106 2017-12-15 10:26:03 james28909 Re: sort HoH by second level values in specific order LanX http://perlmonks.org/index.pl?node_id=1205592 I see 2 questions 1. Well the usual structure for a sorted table is a AoH . @space = ( { node => 1 , "cores" => 12, "memory" => 200 }, { node => 2 , "cores" => 12, "memory" =... note Fri, 15 Dec 2017 15:25:08 +0000 http://perlmonks.org/index.pl?node_id=1205592 1205592 708738 2017-12-15 10:25:08 LanX Re: RTFM!!!!! (but if you didn't, no biggie) shmem http://perlmonks.org/index.pl?node_id=1205591 $::Laziness. _(m?!\)Oo. M z ___ doesn't mean to "skip RTFM"::$ $::Impatience. G\ \ / / hurts while learning things::$ $::Hubris. /\_/(q / / do... note Fri, 15 Dec 2017 15:23:44 +0000 http://perlmonks.org/index.pl?node_id=1205591 1205591 510280 2017-12-15 10:23:44 shmem Re^11: Who is your favorite scientist and why? Anonymous Monk http://perlmonks.org/index.pl?node_id=1205590 It's off-topic. Take it somewhere else.... note Fri, 15 Dec 2017 15:22:11 +0000 http://perlmonks.org/index.pl?node_id=1205590 1205590 961 2017-12-15 10:22:11 Anonymous Monk sruthichowdary sruthichowdary http://perlmonks.org/index.pl?node_id=1205620 user Fri, 15 Dec 2017 20:32:52 +0000 http://perlmonks.org/index.pl?node_id=1205620 1205620 1205620 2017-12-15 15:32:52 sruthichowdary IMFletcher IMFletcher http://perlmonks.org/index.pl?node_id=1205618 user Fri, 15 Dec 2017 19:21:31 +0000 http://perlmonks.org/index.pl?node_id=1205618 1205618 1205618 2017-12-15 14:21:31 IMFletcher nicknash nicknash http://perlmonks.org/index.pl?node_id=1205614 user Fri, 15 Dec 2017 18:25:39 +0000 http://perlmonks.org/index.pl?node_id=1205614 1205614 1205614 2017-12-15 13:25:39 nicknash &lt; &amp; &gt; &lt; &amp; &gt; http://perlmonks.org/index.pl?node_id=1205609 Test account for <a href="?node=lanx">lanx</a>. ..... user Fri, 15 Dec 2017 17:41:51 +0000 http://perlmonks.org/index.pl?node_id=1205609 1205609 1205609 2017-12-15 12:41:51 &lt; &amp; &gt; rqureshi rqureshi http://perlmonks.org/index.pl?node_id=1205607 user Fri, 15 Dec 2017 17:32:18 +0000 http://perlmonks.org/index.pl?node_id=1205607 1205607 1205607 2017-12-15 12:32:18 rqureshi