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 961 PerlMonks 2016-10-01 15:11:39 rss,clean Sat Oct 1 05:11:39 2016 30 20161001051139 Sat Oct 1 05:11:39 2016 http://perlmonks.org/ Anonymous Monk Perl and Garbage Collection Svetlana http://perlmonks.org/index.pl?node_id=1173079 How well does Perl do garbage collection? What I mean is, in a language like C#/Java, GC is taken care of pretty well, to the point that the programmer rarely(I do mean rare!) has to call the G... perlquestion Sat, 01 Oct 2016 13:44:03 +0000 http://perlmonks.org/index.pl?node_id=1173079 1173079 1172486 2016-10-01 09:44:03 Svetlana Rounding numbers in a string fauve http://perlmonks.org/index.pl?node_id=1173072 Hello, Perl monks! A new user here, who is not a programmer really (so be gentle). I am trying to write some code to round floating-point numbers with four decimal places to a neare... perlquestion Sat, 01 Oct 2016 10:28:58 +0000 http://perlmonks.org/index.pl?node_id=1173072 1173072 1173066 2016-10-01 06:28:58 fauve merge lines removing duplicates in a file Anonymous Monk http://perlmonks.org/index.pl?node_id=1173064 I have a file in the following order which has 0 and 1 attached to each column with ':'. I want to combine all into one line. for example if in the file I have NC_009565:0 twice it should be printed o... perlquestion Sat, 01 Oct 2016 09:19:55 +0000 http://perlmonks.org/index.pl?node_id=1173064 1173064 961 2016-10-01 05:19:55 Anonymous Monk Re: Rounding numbers in a string stevieb http://perlmonks.org/index.pl?node_id=1173086 "A new user here, who is not a programmer..." Be careful... I said something very similar ("I am not a programmer") 16 years ago when I wasn't one, I still say it today ... note Sat, 01 Oct 2016 14:47:40 +0000 http://perlmonks.org/index.pl?node_id=1173086 1173086 789891 2016-10-01 10:47:40 stevieb Re: merge lines removing duplicates in a file AnomalousMonk http://perlmonks.org/index.pl?node_id=1173085 In general: c:\@Work\Perl\monks>perl -wMstrict -le "use List::MoreUtils qw(uniq); ;; my @data = qw( NC_009565:0 NC_017524:0 NC_017522:0 NC_018143:0 NC_017026:0 NC_017523:0 ... note Sat, 01 Oct 2016 14:34:06 +0000 http://perlmonks.org/index.pl?node_id=1173085 1173085 634253 2016-10-01 10:34:06 AnomalousMonk Re^4: Inconsistent errors when trying to establish SSL-connection noxxi http://perlmonks.org/index.pl?node_id=1173084 A proxy is not necessarily a caching proxy. Often proxies are employed at firewalls or similar to enforce policies which sites can be visited and to filter traffic. In these cases use of a proxy is ma... note Sat, 01 Oct 2016 14:26:42 +0000 http://perlmonks.org/index.pl?node_id=1173084 1173084 1069398 2016-10-01 10:26:42 noxxi Re^2: Perlsphere dead? Arunbear http://perlmonks.org/index.pl?node_id=1173083 I got an email today from Leo saying that the problem is now fixed. ... note Sat, 01 Oct 2016 14:19:34 +0000 http://perlmonks.org/index.pl?node_id=1173083 1173083 298378 2016-10-01 10:19:34 Arunbear Re: Perl and Garbage Collection BrowserUk http://perlmonks.org/index.pl?node_id=1173082 Perl doesn't use garbage collection per se, but rather reference counting. Which basically means that memory is handed back to the memory pool, once it is no... note Sat, 01 Oct 2016 14:16:45 +0000 http://perlmonks.org/index.pl?node_id=1173082 1173082 171588 2016-10-01 10:16:45 BrowserUk Re: Perl and Garbage Collection haukex http://perlmonks.org/index.pl?node_id=1173081 Hi <a href="?node=Svetlana">Svetlana</a>, Do perl programmers have to worry like C++ programmers do? In general, no. The main thing to remember is that circular references will preven... note Sat, 01 Oct 2016 14:13:54 +0000 http://perlmonks.org/index.pl?node_id=1173081 1173081 830549 2016-10-01 10:13:54 haukex Re: Default DB connection details not found: Plack::Test & Dancer2 stevieb http://perlmonks.org/index.pl?node_id=1173080 Figured out the problem... I had actually installed my app library into @INC as App::EnvUI, and in my test file, it was loading that one. In that path, the library was obvio... note Sat, 01 Oct 2016 14:13:17 +0000 http://perlmonks.org/index.pl?node_id=1173080 1173080 789891 2016-10-01 10:13:17 stevieb Re^6: Hypothesis: some magic string optimalization in perl kills my server from time to time BrowserUk http://perlmonks.org/index.pl?node_id=1173078 Ditto. I couldn't reproduce the OP's timing differences, but I had also commented out no autovivification as I didn't have it (I cannot think why anyone would wa... note Sat, 01 Oct 2016 13:00:58 +0000 http://perlmonks.org/index.pl?node_id=1173078 1173078 171588 2016-10-01 09:00:58 BrowserUk Re^2: Bad File Descriptor (updated) haukex http://perlmonks.org/index.pl?node_id=1173077 Hi <a href="?node=Marshall">Marshall</a>, On Windows, the path in the #! line does not matter I know what you mean (it doesn't matter for finding the location of the interpr... note Sat, 01 Oct 2016 11:36:46 +0000 http://perlmonks.org/index.pl?node_id=1173077 1173077 830549 2016-10-01 07:36:46 haukex Re^2: Rounding numbers in a string fauve http://perlmonks.org/index.pl?node_id=1173076 Wow, this is just beautiful! Thanks from me, and my controller too :) Seriously, thank you!... note Sat, 01 Oct 2016 11:36:01 +0000 http://perlmonks.org/index.pl?node_id=1173076 1173076 1173066 2016-10-01 07:36:01 fauve Re: Rounding numbers in a string choroba http://perlmonks.org/index.pl?node_id=1173075 I'd use the /e modifier to include code into substitution directly: while () { s/ (<a href="?node=XYZA">XYZA</a>) (<a href="?node=-%2B">-+</a>?) (<a href="?node=0-9.">0-9.</a>+) /sprintf "%s$2%.3f", $1, $3 /gex; print; } ... note Sat, 01 Oct 2016 10:58:58 +0000 http://perlmonks.org/index.pl?node_id=1173075 1173075 832495 2016-10-01 06:58:58 choroba Re^5: Hypothesis: some magic string optimalization in perl kills my server from time to time dave_the_m http://perlmonks.org/index.pl?node_id=1173074 I removed the no autovivification line from libr_data as I haven't got a perl to hand with that module installed, and both programs ran fast for me for all perls from 5.10.0 through 5.24... note Sat, 01 Oct 2016 10:56:02 +0000 http://perlmonks.org/index.pl?node_id=1173074 1173074 341121 2016-10-01 06:56:02 dave_the_m Re: join() in perl threads does not return BrowserUk http://perlmonks.org/index.pl?node_id=1173073 Don't do the threads->exit, just fall off the end. But <a href="?node=corion">corion</a> is correct. If you are just after an asynchronous process, $pid = system( 1, ... ) o... note Sat, 01 Oct 2016 10:39:42 +0000 http://perlmonks.org/index.pl?node_id=1173073 1173073 171588 2016-10-01 06:39:42 BrowserUk Re^2: POE / Win32 / select ? soliplaya http://perlmonks.org/index.pl?node_id=1173071 Thanks for the tip. I looked at the various pages you pointed out, and it seemed to me that none of them really corresponded to what I am doing. But I figured, what the heck, by now I am ready to try... note Sat, 01 Oct 2016 10:26:02 +0000 http://perlmonks.org/index.pl?node_id=1173071 1173071 583598 2016-10-01 06:26:02 soliplaya Re: create a binary matrix Laurent_R http://perlmonks.org/index.pl?node_id=1173070 Please indent your code correctly, that would help you see some of your errors or suboptimal loops. Also use the strict and warnings pragmas, this would also help you. How about this: use ... note Sat, 01 Oct 2016 10:14:02 +0000 http://perlmonks.org/index.pl?node_id=1173070 1173070 992570 2016-10-01 06:14:02 Laurent_R Re^3: Inconsistent errors when trying to establish SSL-connection hippo http://perlmonks.org/index.pl?node_id=1173069 Thanks for the pointer to <a href="http://www.faqs.org/rfcs/rfc2817.html">RFC 2817</a>, which explains a lot. It does still leave me wondering quite what the purpose is of using a proxy in such a situation. It can't be caching because the proxy ... note Sat, 01 Oct 2016 09:39:22 +0000 http://perlmonks.org/index.pl?node_id=1173069 1173069 885521 2016-10-01 05:39:22 hippo Re: merge lines removing duplicates in a file choroba http://perlmonks.org/index.pl?node_id=1173068 What did you try? How did it fail? Also, why is NC_017523 printed with :1 when it always contains :0 in the sample input? ... note Sat, 01 Oct 2016 09:39:09 +0000 http://perlmonks.org/index.pl?node_id=1173068 1173068 832495 2016-10-01 05:39:09 choroba Re^4: how to remove an empty line from a xml file?? ankit.tayal560 http://perlmonks.org/index.pl?node_id=1173065 hey was doing a silly mistake. tried the above code . it works! thanks for the help use strict; use warnings; use Data::Dumper; use XML::DOM; my $parser=new XML::DOM::Parser; my... note Sat, 01 Oct 2016 09:29:09 +0000 http://perlmonks.org/index.pl?node_id=1173065 1173065 1170687 2016-10-01 05:29:09 ankit.tayal560 Re^5: how to remove an empty line from a xml file?? Corion http://perlmonks.org/index.pl?node_id=1173063 In the code you already wrote yourself, you use the method ->removeChild. This method is just as applicable for text nodes as it is for other nodes. Maybe now is a really good moment to fami... note Sat, 01 Oct 2016 09:13:48 +0000 http://perlmonks.org/index.pl?node_id=1173063 1173063 5348 2016-10-01 05:13:48 Corion fauve fauve http://perlmonks.org/index.pl?node_id=1173066 user Sat, 01 Oct 2016 09:35:39 +0000 http://perlmonks.org/index.pl?node_id=1173066 1173066 1173066 2016-10-01 05:35:39 fauve