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 20161207153823 30 http://perlmonks.org/ 2016-12-08 02:38:23 PerlMonks Wed Dec 7 15:38:23 2016 Anonymous Monk rss,clean Wed Dec 7 15:38:23 2016 How to perform recursion in any OS? rollec http://perlmonks.org/index.pl?node_id=1177457 I'm making a program that allows a user to generate a HTML page of directories in a system. My issue is that I only made the code to work for linux. I need it to work for ALL operating systems. Ho... perlquestion Thu, 08 Dec 2016 00:09:46 +0000 http://perlmonks.org/index.pl?node_id=1177457 1177457 1177455 2016-12-07 19:09:46 rollec binmode i/o for perl -pi in-place editing pryrt http://perlmonks.org/index.pl?node_id=1177452 how do you set binmode for the input and output of a perl -pi script.pl *.file in-place edit? I had hoped by doing binmode ${^LAST_FH}; binmode STDOUT;, that would cover it...... perlquestion Wed, 07 Dec 2016 23:24:23 +0000 http://perlmonks.org/index.pl?node_id=1177452 1177452 1158292 2016-12-07 18:24:23 pryrt Recomendations For Learning perl? adamZ88 http://perlmonks.org/index.pl?node_id=1177422 All, I want to seriously expand my Perl knowledge. I am a network engineer and I have seen the powers of Perl and how it can make the job easier. I have limited programming experience. I took an in... perlquestion Wed, 07 Dec 2016 20:44:31 +0000 http://perlmonks.org/index.pl?node_id=1177422 1177422 1160247 2016-12-07 15:44:31 adamZ88 Slice and dice a ref to hash teun-arno http://perlmonks.org/index.pl?node_id=1177435 No question here! Just want to show some code. $systems = { 'xai61001' => { # ref to hash ip => '192.168.1.1' , name => 'xai61001', model => '8205_E6C', }, 'xai61002' =... CUFP Wed, 07 Dec 2016 21:53:12 +0000 http://perlmonks.org/index.pl?node_id=1177435 1177435 672017 2016-12-07 16:53:12 teun-arno Re^11: Pragma clash across modules: bignum and Math::BigFloat (hinthash) Anonymous Monk http://perlmonks.org/index.pl?node_id=1177471 ... says the biggest, most cantankerous troll of them all.... note Thu, 08 Dec 2016 02:27:32 +0000 http://perlmonks.org/index.pl?node_id=1177471 1177471 961 2016-12-07 21:27:32 Anonymous Monk Re^10: Pragma clash across modules: bignum and Math::BigFloat (hinthash) BrowserUk http://perlmonks.org/index.pl?node_id=1177470 Agreed. His definition of 'troll' is: 'disagrees with me'. That said: it is not an uncommon definition hereabouts. ... note Thu, 08 Dec 2016 01:51:52 +0000 http://perlmonks.org/index.pl?node_id=1177470 1177470 171588 2016-12-07 20:51:52 BrowserUk Re^9: Pragma clash across modules: bignum and Math::BigFloat (hinthash) Anonymous Monk http://perlmonks.org/index.pl?node_id=1177469 Yeah, trolling is much harder if people are recognizing you. According to your standard of "troll", you prove its not "much harder" or "hard" at all Your fuse is too short... note Thu, 08 Dec 2016 01:40:14 +0000 http://perlmonks.org/index.pl?node_id=1177469 1177469 961 2016-12-07 20:40:14 Anonymous Monk Re^8: Pragma clash across modules: bignum and Math::BigFloat (hinthash) LanX http://perlmonks.org/index.pl?node_id=1177468 That's obviously wrong I don't cling to my proposition, I'm just waiting for any other technical contribution. &gt; This is why I don't log in here any more. Yeah, trolling is ... note Thu, 08 Dec 2016 01:17:37 +0000 http://perlmonks.org/index.pl?node_id=1177468 1177468 708738 2016-12-07 20:17:37 LanX Re^7: Pragma clash across modules: bignum and Math::BigFloat (hinthash) Anonymous Monk http://perlmonks.org/index.pl?node_id=1177467 And here we go with the PerlMonks contentiousness. You won't admit that any point of view other than yours might have merit. You're going to cling to your solution no matter how much complexity you ha... note Thu, 08 Dec 2016 01:06:03 +0000 http://perlmonks.org/index.pl?node_id=1177467 1177467 961 2016-12-07 20:06:03 Anonymous Monk Re^5: Memory usage while tallying instances of lines in a .txt file BrowserUk http://perlmonks.org/index.pl?node_id=1177466 Indeed.... note Thu, 08 Dec 2016 00:57:07 +0000 http://perlmonks.org/index.pl?node_id=1177466 1177466 171588 2016-12-07 19:57:07 BrowserUk Re^3: Most efficient way to remove some text from a string AnomalousMonk http://perlmonks.org/index.pl?node_id=1177465 I was confused because you seem to have /Eminem running wild through your example paths. Others have assumed this is a typo, and you've never denied this. (You've also never confirmed it... note Thu, 08 Dec 2016 00:51:08 +0000 http://perlmonks.org/index.pl?node_id=1177465 1177465 634253 2016-12-07 19:51:08 AnomalousMonk Re: How to perform recursion in any OS? BrowserUk http://perlmonks.org/index.pl?node_id=1177464 Change this line to: chomp(my @files = $^O eq 'MSWin32' ? `dir /b $path` : `ls -a $path`); /b is closer to -A than -a, but that is easily wor... note Thu, 08 Dec 2016 00:49:03 +0000 http://perlmonks.org/index.pl?node_id=1177464 1177464 171588 2016-12-07 19:49:03 BrowserUk Re^3: Most efficient way to remove some text from a string AnomalousMonk http://perlmonks.org/index.pl?node_id=1177463 I'm not sure just who you're replying to, but in general ... ... how "tr" counts the remaining slashes ... Please see discussion of tr/// ... note Thu, 08 Dec 2016 00:42:48 +0000 http://perlmonks.org/index.pl?node_id=1177463 1177463 634253 2016-12-07 19:42:48 AnomalousMonk Re^6: Pragma clash across modules: bignum and Math::BigFloat (hinthash) LanX http://perlmonks.org/index.pl?node_id=1177462 &gt; Your solution is to make it more arcane and weird. My "solution" is one possible workaround to fix legacy code, involving hinthashes like documented in &#91;DOC://perlpragma|perlprag... note Thu, 08 Dec 2016 00:39:28 +0000 http://perlmonks.org/index.pl?node_id=1177462 1177462 708738 2016-12-07 19:39:28 LanX Re^7: Recomendations For Learning perl? stevieb http://perlmonks.org/index.pl?node_id=1177461 Yeah, I knew Nick would come back with some code as well, so I thought I'd put something out there that the OP could glean in the meantime ;)... note Thu, 08 Dec 2016 00:30:56 +0000 http://perlmonks.org/index.pl?node_id=1177461 1177461 789891 2016-12-07 19:30:56 stevieb Re^3: Can not Dance on Windows Anonymous Monk http://perlmonks.org/index.pl?node_id=1177460 If SA_RESTART is missing, it wouldn't matter much which flavor of windows perl you're running There are other FCGI things to try FCGI::Engine/FCGI::Async ... note Thu, 08 Dec 2016 00:27:14 +0000 http://perlmonks.org/index.pl?node_id=1177460 1177460 961 2016-12-07 19:27:14 Anonymous Monk Re^5: Pragma clash across modules: bignum and Math::BigFloat (hinthash) Anonymous Monk http://perlmonks.org/index.pl?node_id=1177459 The problem is that bignum is arcane and weird. Your solution is to make it more arcane and weird. IMO the right solution is to make it less arcane and weird: just have it convert all numbers... note Thu, 08 Dec 2016 00:23:18 +0000 http://perlmonks.org/index.pl?node_id=1177459 1177459 961 2016-12-07 19:23:18 Anonymous Monk Re: How to perform recursion in any OS? choroba http://perlmonks.org/index.pl?node_id=1177458 Instead of `ls -a $path`, which doesn't work for filenames containing spaces, anyway, use <a href="http://perldoc.perl.org/functions/glob.html">glob</a>, or <a href="http://perldoc.perl.org/File/Find.html">File::Find</a> or <a href="http://perldoc.perl.org/File/Find/Rule.html">File::Find::Rule</a> etc. ... note Thu, 08 Dec 2016 00:22:26 +0000 http://perlmonks.org/index.pl?node_id=1177458 1177458 832495 2016-12-07 19:22:26 choroba Re^3: pp and setting Windows LegalCopyright in executable header (node considered, keep) beech http://perlmonks.org/index.pl?node_id=1177454 I also voted keep, because the consideration is invalid ( <a href="?node_id=326922">How do I use the power of consideration responsibly?</a> ) on top of being propaganda ( &#91;href://http://arstechnica.com/tech-policy/2013/12/judge-mpaa-cant-call-hotfile-founders-pir... note Wed, 07 Dec 2016 23:53:15 +0000 http://perlmonks.org/index.pl?node_id=1177454 1177454 1136678 2016-12-07 18:53:15 beech Re: binmode i/o for perl -pi in-place editing choroba http://perlmonks.org/index.pl?node_id=1177453 Similar to <a href="?node_id=624171">binmode and one-liners</a>, isn't it? ($q=q:Sq=~/;<a href="?node=c">c</a>(.)(.)/;chr(-||-|5+lengthSq)`"S|o... note Wed, 07 Dec 2016 23:40:48 +0000 http://perlmonks.org/index.pl?node_id=1177453 1177453 832495 2016-12-07 18:40:48 choroba Re^4: Pragma clash across modules: bignum and Math::BigFloat (hinthash) LanX http://perlmonks.org/index.pl?node_id=1177451 The definition is indeed fuzzy. But in the case of <a href="http://perldoc.perl.org/lib.html">lib</a> I'd opt for pragma because it's a compile time effect and the globality is intended. &gt; bignum tried to be ... note Wed, 07 Dec 2016 23:06:54 +0000 http://perlmonks.org/index.pl?node_id=1177451 1177451 708738 2016-12-07 18:06:54 LanX Re: Slice and dice a ref to hash kcott http://perlmonks.org/index.pl?node_id=1177450 G'day <a href="?node_id=672017">teun-arno</a>, You started your post with: "No question here! Just want to show some code." You posted it in "&#91;id://47... note Wed, 07 Dec 2016 23:00:59 +0000 http://perlmonks.org/index.pl?node_id=1177450 1177450 861371 2016-12-07 18:00:59 kcott Re^6: download an array of text as pdf ajaykannan http://perlmonks.org/index.pl?node_id=1177449 it depends upon the data from the network devices. but I can tell like if I download it as txt then the line might reach atleast 1100 lines... note Wed, 07 Dec 2016 22:58:38 +0000 http://perlmonks.org/index.pl?node_id=1177449 1177449 1177048 2016-12-07 17:58:38 ajaykannan Re^5: Recomendations For Learning perl? 1nickt http://perlmonks.org/index.pl?node_id=1177448 Sure, here you go: use strict; use warnings; use Algorithm::Diff qw/ LCS_length /; my $name = $ARGV&#91;0&#93; && length $ARGV&#91;0&#93; > 2 or die "Usage: `$0 ` (min. 3 letters)"; open my $f... note Wed, 07 Dec 2016 22:49:32 +0000 http://perlmonks.org/index.pl?node_id=1177448 1177448 1130276 2016-12-07 17:49:32 1nickt Re^4: Can't use string ("1") as an ARRAY ref while "strict refs seekinghelp12 http://perlmonks.org/index.pl?node_id=1177447 ok. thanks much for all of your help.... note Wed, 07 Dec 2016 22:37:37 +0000 http://perlmonks.org/index.pl?node_id=1177447 1177447 1177401 2016-12-07 17:37:37 seekinghelp12 Re^3: Pragma clash across modules: bignum and Math::BigFloat (hinthash) Anonymous Monk http://perlmonks.org/index.pl?node_id=1177446 Pragmas are named in all lowercase. But not everything that is named in all lowercase is a pragma. Take use lib, for instance. Not a pragma; it globally chang... note Wed, 07 Dec 2016 22:36:40 +0000 http://perlmonks.org/index.pl?node_id=1177446 1177446 961 2016-12-07 17:36:40 Anonymous Monk Re: Recomendations For Learning perl? Discipulus http://perlmonks.org/index.pl?node_id=1177445 hello <a href="?node=adamZ88">adamZ88</a>, recomendations? yes see this <a href="?node_id=1176411">recent reply</a> of mine.. I also have some bookmarks about learning and teaching on my &#91;href://http://www.perlmonks.org/?node_id=... note Wed, 07 Dec 2016 22:30:27 +0000 http://perlmonks.org/index.pl?node_id=1177445 1177445 174111 2016-12-07 17:30:27 Discipulus Re^2: Term::ANSIMenu help FreeBeerReekingMonk http://perlmonks.org/index.pl?node_id=1177444 For completeness: As separate lines: $menu->selection_bgcolor("GREEN"); $menu->selection_fgcolor("YELLOW"); Inside the constructor: my $menu = Term::ANSIMenu-... note Wed, 07 Dec 2016 22:26:17 +0000 http://perlmonks.org/index.pl?node_id=1177444 1177444 1117559 2016-12-07 17:26:17 FreeBeerReekingMonk Re^6: Recomendations For Learning perl? Laurent_R http://perlmonks.org/index.pl?node_id=1177443 Hi Steve, ++ for the code, but I don't think that you program will produce a list anywhere near the one by <a href="?node=1nickt">1nickt</a>, since your code looks for the adam letters in sequence. ... note Wed, 07 Dec 2016 22:14:09 +0000 http://perlmonks.org/index.pl?node_id=1177443 1177443 992570 2016-12-07 17:14:09 Laurent_R Re^4: Memory usage while tallying instances of lines in a .txt file RonW http://perlmonks.org/index.pl?node_id=1177442 It assumes no count will be greater than 256. If that's too small, change the three 8s to 16s Actually, the 8s give a max count of 255 (0b00000000 .. 0b11111111... note Wed, 07 Dec 2016 22:11:24 +0000 http://perlmonks.org/index.pl?node_id=1177442 1177442 1080444 2016-12-07 17:11:24 RonW Re^2: Pragma clash across modules: bignum and Math::BigFloat (hinthash) LanX http://perlmonks.org/index.pl?node_id=1177441 &gt; bignum is meddling with the globals $Math::BigFloat::downgrade and $Math::BigInt::upgrade. I haven't checked in detail yet (the code is a bit obscure) but this sounds reasonable. ... note Wed, 07 Dec 2016 22:10:34 +0000 http://perlmonks.org/index.pl?node_id=1177441 1177441 708738 2016-12-07 17:10:34 LanX Re: Slice and dice a ref to hash teun-arno http://perlmonks.org/index.pl?node_id=1177440 The $keys$idx should be : print "$keys<a href="?node=%24idx">$idx</a> => $values<a href="?node=%24idx">$idx</a>\n"; Sorry!... note Wed, 07 Dec 2016 22:07:12 +0000 http://perlmonks.org/index.pl?node_id=1177440 1177440 672017 2016-12-07 17:07:12 teun-arno Re^7: Most efficient way to remove some text from a string tybalt89 http://perlmonks.org/index.pl?node_id=1177439 It does for me. Please post entire code that you claim does not show indentation. ... note Wed, 07 Dec 2016 22:03:58 +0000 http://perlmonks.org/index.pl?node_id=1177439 1177439 1172229 2016-12-07 17:03:58 tybalt89 Re^5: Recomendations For Learning perl? stevieb http://perlmonks.org/index.pl?node_id=1177438 Command line one-liner: perl -wMstrict -E 'print for grep /adam/, ' /usr/share/dict/words Script form (overly verbose so it's easier to understand): use warnin... note Wed, 07 Dec 2016 22:01:22 +0000 http://perlmonks.org/index.pl?node_id=1177438 1177438 789891 2016-12-07 17:01:22 stevieb Re^5: Recomendations For Learning perl? Laurent_R http://perlmonks.org/index.pl?node_id=1177437 I am pretty sure <a href="?node=1nickt">1nickt</a> will share it with you, since you kindly ask. Sharing code is certainly part of the Perl culture and also part of this site's raison d'Ítre. And you might very w... note Wed, 07 Dec 2016 22:00:31 +0000 http://perlmonks.org/index.pl?node_id=1177437 1177437 992570 2016-12-07 17:00:31 Laurent_R Re: Recomendations For Learning perl? FreeBeerReekingMonk http://perlmonks.org/index.pl?node_id=1177436 Welcome adamZ88. Make it fun AND useful, learn by fiddling and tinkering (i.e. less reading, more running/modifying example code). Once you got the basics of the Perl language down (don't try to learn... note Wed, 07 Dec 2016 21:53:19 +0000 http://perlmonks.org/index.pl?node_id=1177436 1177436 1117559 2016-12-07 16:53:19 FreeBeerReekingMonk Re^4: Recomendations For Learning perl? adamZ88 http://perlmonks.org/index.pl?node_id=1177434 I don't suppose you would want to share the code for this program hu Nick? It is pretty cool.... note Wed, 07 Dec 2016 21:47:35 +0000 http://perlmonks.org/index.pl?node_id=1177434 1177434 1160247 2016-12-07 16:47:35 adamZ88 Re: Spreadsheet::Read - Changes and quest for feedback FreeBeerReekingMonk http://perlmonks.org/index.pl?node_id=1177433 Looks like some neat changes. Thanks for all the hard work. I would like left, right, up and down. so, $sheet->cellright("A1") # B1 $sheet->celldown("A1") # A2 $sheet->cellrigh... note Wed, 07 Dec 2016 21:42:24 +0000 http://perlmonks.org/index.pl?node_id=1177433 1177433 1117559 2016-12-07 16:42:24 FreeBeerReekingMonk Re: Recomendations For Learning perl? huck http://perlmonks.org/index.pl?node_id=1177432 One way to learn that i have not seen here YET is to read other peoples programs. While i have a CompSci background most of my insight has come from looking at how other people solve problems. ... note Wed, 07 Dec 2016 21:34:12 +0000 http://perlmonks.org/index.pl?node_id=1177432 1177432 1175204 2016-12-07 16:34:12 huck Re^3: Recomendations For Learning perl? 1nickt http://perlmonks.org/index.pl?node_id=1177431 Not as many as I would have guessed! $ perl dev/bin/namagram.pl adam 1 abecedarium 2 acaridomatium 3 accidentalism 4 acediamine 5 acrodactylum 6 adactylism 7 adamant 8 ad... note Wed, 07 Dec 2016 21:31:24 +0000 http://perlmonks.org/index.pl?node_id=1177431 1177431 1130276 2016-12-07 16:31:24 1nickt Re: Spreadsheet::Read - Changes and quest for feedback Laurent_R http://perlmonks.org/index.pl?node_id=1177430 Hi Merijn, adding sheets to an existing book seems a fairly good idea. I fully support the idea. On the OO interface, why not, but let's say that I a bit skeptical: I have the feeling that... note Wed, 07 Dec 2016 21:24:00 +0000 http://perlmonks.org/index.pl?node_id=1177430 1177430 992570 2016-12-07 16:24:00 Laurent_R Re: Recomendations For Learning perl? kennethk http://perlmonks.org/index.pl?node_id=1177429 Adding to the excellent responses so far, I would add 2 recommendations: Read other people's posts here and see if you can solve the challenges. Don't worry about being fast or even p... note Wed, 07 Dec 2016 21:21:38 +0000 http://perlmonks.org/index.pl?node_id=1177429 1177429 712372 2016-12-07 16:21:38 kennethk Re: Term::ANSIMenu help FreeBeerReekingMonk http://perlmonks.org/index.pl?node_id=1177428 $menu->selection_fgcolor("RED"); thus: #!/usr/bin/perl use Term::ANSIMenu; my $menu = Term::ANSIMenu->new( width => 40, help => &#91;<a href="?node=%27%27%2C%20%5C%26standard_help">&#39;&#39;, \&amp;standard_help</a>, ... note Wed, 07 Dec 2016 21:20:53 +0000 http://perlmonks.org/index.pl?node_id=1177428 1177428 1117559 2016-12-07 16:20:53 FreeBeerReekingMonk Re: Recomendations For Learning perl? Anonymous Monk http://perlmonks.org/index.pl?node_id=1177427 See <a href="?node=eyepopslikeamosquito">eyepopslikeamosquito</a>'s very relevant post <a href="?node_id=1172735">here</a>.... note Wed, 07 Dec 2016 21:00:56 +0000 http://perlmonks.org/index.pl?node_id=1177427 1177427 961 2016-12-07 16:00:56 Anonymous Monk Re^2: Recomendations For Learning perl? adamZ88 http://perlmonks.org/index.pl?node_id=1177426 Looks very helpful. Thanks. I do find it that programming for things that interest me makes things easier and more fun to learn. I will give this I tr. Hmmm I wonder how many words contain my name.... note Wed, 07 Dec 2016 21:00:35 +0000 http://perlmonks.org/index.pl?node_id=1177426 1177426 1160247 2016-12-07 16:00:35 adamZ88 Re^7: Most efficient way to remove some text from a string poj http://perlmonks.org/index.pl?node_id=1177425 XML ? something like this perhaps. Open the output file with a browser to get text folding. #!perl use strict; use XML::Simple; #my $infile = '/home/zzz/Desktop/Scripting/usb/musicLib... note Wed, 07 Dec 2016 20:56:13 +0000 http://perlmonks.org/index.pl?node_id=1177425 1177425 221725 2016-12-07 15:56:13 poj Re: Recomendations For Learning perl? 1nickt http://perlmonks.org/index.pl?node_id=1177424 Hi <a href="?node=adamZ88">adamZ88</a>, Welcome to the monastery. The first place to start would be <a href="https://learn.perl.org/">https://learn.perl.org/</a>, which has a lot of links to other sources of d... note Wed, 07 Dec 2016 20:53:40 +0000 http://perlmonks.org/index.pl?node_id=1177424 1177424 1130276 2016-12-07 15:53:40 1nickt Re^2: pp and setting Windows LegalCopyright in executable header [node considered] kcott http://perlmonks.org/index.pl?node_id=1177423 Your post has been considered: "invitation to piracy? If so, vote reap." (see "<a href="?node_id=28877">Nodes to consider</a>"). I didn't think piracy was your intent and voted "edit"; ... note Wed, 07 Dec 2016 20:52:36 +0000 http://perlmonks.org/index.pl?node_id=1177423 1177423 861371 2016-12-07 15:52:36 kcott rollec rollec http://perlmonks.org/index.pl?node_id=1177455 user Thu, 08 Dec 2016 00:02:13 +0000 http://perlmonks.org/index.pl?node_id=1177455 1177455 1177455 2016-12-07 19:02:13 rollec