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 clean,rss Anonymous Monk Mon May 22 21:51:28 2017 30 Mon May 22 21:51:28 2017 PerlMonks 961 http://perlmonks.org/ 2017-05-23 07:51:28 20170522215128 Hash Multiple values for a key-Filtering unique values for a key in hash rahulme81 http://perlmonks.org/index.pl?node_id=1190924 Hi, Below is the output of hash. I get multipe values for my keys and values appeared more than one, I need to have only unique values for a key. $HASH1 = { 'Alabama' => &#91;... perlquestion Tue, 23 May 2017 03:11:10 +0000 http://perlmonks.org/index.pl?node_id=1190924 1190924 1139138 2017-05-22 23:11:10 rahulme81 Re^3: Experimental push on scalar now forbidden (override) kcott http://perlmonks.org/index.pl?node_id=1190934 "BTW: since I have no access to 5.24 it'll be nice to know what prototype 'CORE::push' returns." $ perl -v | head -2 | tail -1 This is perl 5, ... note Tue, 23 May 2017 07:39:27 +0000 http://perlmonks.org/index.pl?node_id=1190934 1190934 861371 2017-05-23 03:39:27 kcott Re: \b in Unicode regex kcott http://perlmonks.org/index.pl?node_id=1190933 G'day <a href="?node_id=1183732">Arik123</a>, Two pieces of information, from <a href="http://perldoc.perl.org/perlrebackslash.html">perlrebackslash</a>, to note. From the "&#91;http://perldoc.perl.org/p... note Tue, 23 May 2017 06:56:32 +0000 http://perlmonks.org/index.pl?node_id=1190933 1190933 861371 2017-05-23 02:56:32 kcott Re^6: Check if a scalar contains a complete HTTP request FloydATC http://perlmonks.org/index.pl?node_id=1190932 Wireshark depends on getting all the certificates handed to it in order to decrypt traffic, so that's a completely different game. Very good for inspecting inbound SSL traffic to your own servers, ... note Tue, 23 May 2017 06:23:25 +0000 http://perlmonks.org/index.pl?node_id=1190932 1190932 616809 2017-05-23 02:23:25 FloydATC Re: Hash Multiple values for a key-Filtering unique values for a key in hash shmem http://perlmonks.org/index.pl?node_id=1190931 I get multipe values for my keys and values appeared more than one Each hash key only holds one value. In this case, the value is a reference to a... note Tue, 23 May 2017 06:16:51 +0000 http://perlmonks.org/index.pl?node_id=1190931 1190931 510280 2017-05-23 02:16:51 shmem Re: Hash Multiple values for a key-Filtering unique values for a key in hash kcott http://perlmonks.org/index.pl?node_id=1190930 G'day <a href="?node_id=1139138">rahulme81</a>, That's a <a href="http://perldoc.perl.org/perlfaq.html">FAQ</a>: &#91;http://perldoc.perl.org/perlfaq4.html#How-can-I-remove-duplicate-elements-from-a-list-or-array%3f... note Tue, 23 May 2017 05:59:29 +0000 http://perlmonks.org/index.pl?node_id=1190930 1190930 861371 2017-05-23 01:59:29 kcott Re^3: Hash Multiple values for a key-Filtering unique values for a key in hash AnomalousMonk http://perlmonks.org/index.pl?node_id=1190929 How can i put this in my script ? If your data is held in the form of a hash (not a hash reference), e.g. my %hash = ( 'Alabama' => &#91;... note Tue, 23 May 2017 04:06:35 +0000 http://perlmonks.org/index.pl?node_id=1190929 1190929 634253 2017-05-23 00:06:35 AnomalousMonk Re^3: CGI hangs unless print AnomalousMonk http://perlmonks.org/index.pl?node_id=1190928 What do you mean by go away? The AnonyMonk is saying in a grumpy way what <a href="?node=roboticus">roboticus</a> and <a href="?node=GrandFather">GrandFather</a> have said more clearly and cogently: Without ... note Tue, 23 May 2017 03:56:20 +0000 http://perlmonks.org/index.pl?node_id=1190928 1190928 634253 2017-05-22 23:56:20 AnomalousMonk Re^2: Hash Multiple values for a key-Filtering unique values for a key in hash rahulme81 http://perlmonks.org/index.pl?node_id=1190927 Thanks. How can i put this in my script ? is like below make_uniq(\%hashref); dd $hashref; sub make_uniq { my ($hr) = @_; $_ = <a href="?node=%20uniq%20%40%24_%20"> uniq @$_ </a> for values %$hr; } ... note Tue, 23 May 2017 03:49:13 +0000 http://perlmonks.org/index.pl?node_id=1190927 1190927 1139138 2017-05-22 23:49:13 rahulme81 Re: Hash Multiple values for a key-Filtering unique values for a key in hash Athanasius http://perlmonks.org/index.pl?node_id=1190926 Hello <a href="?node=rahulme81">rahulme81</a>, Another approach is to store each set of values in its own hash, rather than in an array: use strict; use warnings; use Data::Dump; my $HASH1 = { ... note Tue, 23 May 2017 03:37:52 +0000 http://perlmonks.org/index.pl?node_id=1190926 1190926 968231 2017-05-22 23:37:52 Athanasius Re: Hash Multiple values for a key-Filtering unique values for a key in hash AnomalousMonk http://perlmonks.org/index.pl?node_id=1190925 One way: c:\@Work\Perl\monks>perl -wMstrict -le "use List::MoreUtils qw(uniq); ;; use Data::Dump qw(dd); ;; my $hashref = { 'Alabama' => &#91; qw(Andalusia Anniston Clanton E... note Tue, 23 May 2017 03:30:15 +0000 http://perlmonks.org/index.pl?node_id=1190925 1190925 634253 2017-05-22 23:30:15 AnomalousMonk Re: CGI hangs unless print GrandFather http://perlmonks.org/index.pl?node_id=1190923 What <a href="?node=roboticus">roboticus</a> said. CGI applications, as I'm sure you must know, work by writing their output to stdout. If your application spends a long time thinking without generating any traffic on stdout ... note Tue, 23 May 2017 02:39:35 +0000 http://perlmonks.org/index.pl?node_id=1190923 1190923 461912 2017-05-22 22:39:35 GrandFather Re: CGI hangs unless print roboticus http://perlmonks.org/index.pl?node_id=1190922 <a href="?node=janedoh">janedoh</a>: Without seeing what code you're running, it's hard to come up with a possible answer. You don't need to provide everything, just pare down your application until you can reprodu... note Tue, 23 May 2017 02:03:21 +0000 http://perlmonks.org/index.pl?node_id=1190922 1190922 533863 2017-05-22 22:03:21 roboticus