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 Fri Oct 22 13:54:07 2021 2021-10-22 23:54:07 30 Anonymous Monk PerlMonks 961 rss,clean Fri Oct 22 13:54:07 2021 20211022135407 http://perlmonks.org/ Dump the key value pairs in a hash byrnejb http://perlmonks.org/index.pl?node_id=11137898 I am not a perl programmer. I do have to maintain a legacy perl application. Something has changed in the environment so that it no longer correctly reports the status of public key certificates. I... perlquestion Fri, 22 Oct 2021 20:12:46 +0000 http://perlmonks.org/index.pl?node_id=11137898 11137898 1174705 2021-10-22 16:12:46 byrnejb Re^5: Perl tutorial building on Python skills? LanX http://perlmonks.org/index.pl?node_id=11137902 No sorry, I don't. I'm only aware of three books, ("Perl Hacks" was also co-authored by him) There are slides from <a href="?node=merlyn">merlyn</a> covering PBP online... I think the summary table at the a... note Fri, 22 Oct 2021 21:24:53 +0000 http://perlmonks.org/index.pl?node_id=11137902 11137902 708738 2021-10-22 17:24:53 LanX Re: Dump the key value pairs in a hash haj http://perlmonks.org/index.pl?node_id=11137901 Well, yes, there's a rather easy fix. $self is a reference to the actual hash. You can convert ("dereference") it by writing %$self instead of %self... note Fri, 22 Oct 2021 20:27:07 +0000 http://perlmonks.org/index.pl?node_id=11137901 11137901 1184095 2021-10-22 16:27:07 haj Re: Dump the key value pairs in a hash choroba http://perlmonks.org/index.pl?node_id=11137900 $self is a scalar variable, so it's not a hash, it's a reference to a hash. You need to dereference it to get the hash: print map { "Key: $_ has Value:$self->{$_}\n" } keys %$self; # ... note Fri, 22 Oct 2021 20:21:40 +0000 http://perlmonks.org/index.pl?node_id=11137900 11137900 832495 2021-10-22 16:21:40 choroba Re: Dump the key value pairs in a hash Anonymous Monk http://perlmonks.org/index.pl?node_id=11137899 <a href="http://search.cpan.org/perldoc?Data%3A%3ADump">Data::Dump</a> from CPAN or <a href="http://perldoc.perl.org/Data/Dumper.html">Data::Dumper</a> in the core... note Fri, 22 Oct 2021 20:19:53 +0000 http://perlmonks.org/index.pl?node_id=11137899 11137899 961 2021-10-22 16:19:53 Anonymous Monk Re^4: Perl tutorial building on Python skills? eyepopslikeamosquito http://perlmonks.org/index.pl?node_id=11137897 > Damian is a brilliant author Agreed. Always a joy to read! (ditto for <a href="?node=chromatic">chromatic</a> and <a href="?node=brian_d_foy">brian_d_foy</a>). Unlike <a href="?node=chromatic">chromatic</a> thou... note Fri, 22 Oct 2021 20:10:05 +0000 http://perlmonks.org/index.pl?node_id=11137897 11137897 176576 2021-10-22 16:10:05 eyepopslikeamosquito Re: regex in perl perlfan http://perlmonks.org/index.pl?node_id=11137896 It's doing exactly what you're telling it to do since code (heh) is in the examples you. <a href="http://perldoc.perl.org/functions/grep.html">grep</a> works conceptionally the same way as the utility, so you need to define a regexp that... note Fri, 22 Oct 2021 18:17:00 +0000 http://perlmonks.org/index.pl?node_id=11137896 11137896 313292 2021-10-22 14:17:00 perlfan Re^4: Rosetta code: Split an array into chunks LanX http://perlmonks.org/index.pl?node_id=11137895 I'm surprised your username doesn't contain multiple / and 99 The <a href="?node=gods">gods</a> would certainly grant your wish to transform it into an unreadable regex ... ;-P ... note Fri, 22 Oct 2021 18:01:06 +0000 http://perlmonks.org/index.pl?node_id=11137895 11137895 708738 2021-10-22 14:01:06 LanX Re^3: Rosetta code: Split an array into chunks tybalt89 http://perlmonks.org/index.pl?node_id=11137894 Why splice when you can regex ? #!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=861938 use warnings; sub chunk_array { my $n = shift() - 1; "@_\n" =~ s... note Fri, 22 Oct 2021 17:57:19 +0000 http://perlmonks.org/index.pl?node_id=11137894 11137894 1172229 2021-10-22 13:57:19 tybalt89