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 2014-04-17 10:55:08 rss,clean Thu Apr 17 00:55:08 2014 30 20140417005508 Thu Apr 17 00:55:08 2014 http://perlmonks.org/ Anonymous Monk any mechanism to go to the end of a loop but do not exit the loop simonz http://perlmonks.org/index.pl?node_id=1082625 Hi Is there any variable or keywords in Perl which will take me to the end of a loop but won't exit the loop. Likewise , we have 'next' and 'last' in perl to go to the next ite... perlquestion Thu, 17 Apr 2014 10:38:16 +0000 http://perlmonks.org/index.pl?node_id=1082625 1082625 1053739 2014-04-17 06:38:16 simonz install Devel::Cover 1.09 perl_help26 http://perlmonks.org/index.pl?node_id=1082619 I am trying to install an earlier version of Devel::Cover (i.e. Devel::Cover 1.09) how do I do that exactly? Thanks... perlquestion Thu, 17 Apr 2014 10:04:19 +0000 http://perlmonks.org/index.pl?node_id=1082619 1082619 1071933 2014-04-17 06:04:19 perl_help26 Persistent HTTP connection mst226 http://perlmonks.org/index.pl?node_id=1082614 Hi everyone. I am trying to write a web client that connects to an API using HTTP. The API server is the Gephi software (https://gephi.org) with the "streaming plugin" which accepts comma... perlquestion Thu, 17 Apr 2014 09:31:49 +0000 http://perlmonks.org/index.pl?node_id=1082614 1082614 1082489 2014-04-17 05:31:49 mst226 Extracting multiple column from csv file and adding/appending onto new csv file with first columns already existing bks http://perlmonks.org/index.pl?node_id=1082609 Hi All My requirement is to connect to multiple network devices(cisco,juniper) and pull some data to csv file and further filtering it (column wise) and putting it in different csv. ... perlquestion Thu, 17 Apr 2014 08:45:29 +0000 http://perlmonks.org/index.pl?node_id=1082609 1082609 1081981 2014-04-17 04:45:29 bks Replace text in file snackpie http://perlmonks.org/index.pl?node_id=1082598 Hi, I have a file that can have a line something like this : #define MYVERSION 11 So, in the file I need to find the line starting with : #define MYVERSION ... perlquestion Thu, 17 Apr 2014 06:42:06 +0000 http://perlmonks.org/index.pl?node_id=1082598 1082598 1082595 2014-04-17 02:42:06 snackpie Reaped: cheap ray ban sunglass NodeReaper http://perlmonks.org/index.pl?node_id=1082594 This node was taken out by the <a href="?node=NodeReaper">NodeReaper</a> on Apr 17, 2014 at 06:49&nbsp;UTCReason: &#91;<a href="?node=kcott">kcott</a>&#93;: Reap: spamYou may view &#91;href://?node=Visit%20Reaped%20Nodes&nodenum=1082594|the original ... perlmeditation Thu, 17 Apr 2014 06:20:18 +0000 http://perlmonks.org/index.pl?node_id=1082594 1082594 52855 2014-04-17 02:20:18 NodeReaper Reaped: cheap ray ban sunglass NodeReaper http://perlmonks.org/index.pl?node_id=1082592 This node was taken out by the <a href="?node=NodeReaper">NodeReaper</a> on Apr 17, 2014 at 06:09&nbsp;UTCReason: &#91;<a href="?node=atcroft">atcroft</a>&#93;: Reap: possible spamYou may view &#91;href://?node=Visit%20Reaped%20Nodes&nodenum=1082592|th... perlmeditation Thu, 17 Apr 2014 05:47:39 +0000 http://perlmonks.org/index.pl?node_id=1082592 1082592 52855 2014-04-17 01:47:39 NodeReaper Re: any mechanism to go to the end of a loop but do not exit the loop Laurent_R http://perlmonks.org/index.pl?node_id=1082631 That is what <a href="?node=next">next</a> or <a href="?node=last">last</a> do in effect: they bring you both to the end of the loop and either start into the loop again or exit the loop. Or do you have something else in mind? You might also take... note Thu, 17 Apr 2014 10:50:01 +0000 http://perlmonks.org/index.pl?node_id=1082631 1082631 992570 2014-04-17 06:50:01 Laurent_R Re: any mechanism to go to the end of a loop but do not exit the loop Bloodnok http://perlmonks.org/index.pl?node_id=1082630 Strictly speaking, last doesn't go to the next iteration, it exists the iteration at that point. Is it possible that you're thinking of the <a href="http://perldoc.perl.org/functions/continue.html">continue</a> block? ... note Thu, 17 Apr 2014 10:48:13 +0000 http://perlmonks.org/index.pl?node_id=1082630 1082630 264639 2014-04-17 06:48:13 Bloodnok Re: any mechanism to go to the end of a loop but do not exit the loop bigj http://perlmonks.org/index.pl?node_id=1082629 You can always use a <a href="http://perldoc.perl.org/functions/goto.html">goto</a> statement, like while (foo()) { ... goto JUST_BEFORE_END_OF_LOOP if bar(); ... ... JUST_BEFORE_OF_LOOP: clean_up } You might al... note Thu, 17 Apr 2014 10:47:29 +0000 http://perlmonks.org/index.pl?node_id=1082629 1082629 203656 2014-04-17 06:47:29 bigj Re^3: Threads Printing Issue - Output Mangled / Term Crashing Preceptor http://perlmonks.org/index.pl?node_id=1082628 Here's a starter for 10...... note Thu, 17 Apr 2014 10:47:19 +0000 http://perlmonks.org/index.pl?node_id=1082628 1082628 168083 2014-04-17 06:47:19 Preceptor Re: any mechanism to go to the end of a loop but do not exit the loop lidden http://perlmonks.org/index.pl?node_id=1082627 How should this be different from next? Edit: Or last depending on what you meant.... note Thu, 17 Apr 2014 10:44:27 +0000 http://perlmonks.org/index.pl?node_id=1082627 1082627 385081 2014-04-17 06:44:27 lidden Re^2: Replace text in file Laurent_R http://perlmonks.org/index.pl?node_id=1082626 Yes, that could be used, but the problem I see with <a href="?node=substr">substr</a> here is that we cannot be sure whether the version number has one or two or several digits, so you need further processing for determining ... note Thu, 17 Apr 2014 10:44:02 +0000 http://perlmonks.org/index.pl?node_id=1082626 1082626 992570 2014-04-17 06:44:02 Laurent_R Re: removing duplicates from an array of hashes hdb http://perlmonks.org/index.pl?node_id=1082624 Using an anonymous hash, not maintaining the original order: @$ref = values %{{ map { $_->{'id'} => $_ } @$ref }}; ... note Thu, 17 Apr 2014 10:38:00 +0000 http://perlmonks.org/index.pl?node_id=1082624 1082624 1021810 2014-04-17 06:38:00 hdb Re: install Devel::Cover 1.09 bigj http://perlmonks.org/index.pl?node_id=1082623 Have you followed the CPAN FAQ, Section 12, How do I install a "DEVELOPER RELEASE" of a module? ... note Thu, 17 Apr 2014 10:32:30 +0000 http://perlmonks.org/index.pl?node_id=1082623 1082623 203656 2014-04-17 06:32:30 bigj Re^5: How to get the path coverage (or lines of code executed) after running a perl test file DrHyde http://perlmonks.org/index.pl?node_id=1082622 $ cpan PJCJ/Devel-Cover-1.09.tar.gz... note Thu, 17 Apr 2014 10:16:56 +0000 http://perlmonks.org/index.pl?node_id=1082622 1082622 84630 2014-04-17 06:16:56 DrHyde Re: Help required in find command. DrHyde http://perlmonks.org/index.pl?node_id=1082621 I recommend hiring a programmer.... note Thu, 17 Apr 2014 10:14:35 +0000 http://perlmonks.org/index.pl?node_id=1082621 1082621 84630 2014-04-17 06:14:35 DrHyde Re^2: propose updating node about linking to cpan modules choroba http://perlmonks.org/index.pl?node_id=1082620 A <a href="?node=...">...</a> style link could not achieve this <a href="?node_id=43037#cpan">?node_id=43037#cpan</a> -> <a href="?node_id=43037#cpan">?node_id=43037#cpan</a> ... note Thu, 17 Apr 2014 10:10:24 +0000 http://perlmonks.org/index.pl?node_id=1082620 1082620 832495 2014-04-17 06:10:24 choroba Re^5: Extracting multiple column from csv file and adding/appending onto new csv file with first columns already existing Yaerox http://perlmonks.org/index.pl?node_id=1082618 Wasn't a offend ;-) It was more like, I'm pretty new on perlmonks, don't wanna tell wrong solutions ^^... note Thu, 17 Apr 2014 09:53:02 +0000 http://perlmonks.org/index.pl?node_id=1082618 1082618 1081946 2014-04-17 05:53:02 Yaerox Re^4: Extracting multiple column from csv file and adding/appending onto new csv file with first columns already existing Bloodnok http://perlmonks.org/index.pl?node_id=1082617 Worry not, I wasn't disputing your posited solution, merely answering the question you posed. A user level that continues to overstate my experienc... note Thu, 17 Apr 2014 09:45:09 +0000 http://perlmonks.org/index.pl?node_id=1082617 1082617 264639 2014-04-17 05:45:09 Bloodnok Re: $SIG{ALRM} to just log something? Bloodnok http://perlmonks.org/index.pl?node_id=1082616 Aside from the previous pertinent suggestions, <a href="http://search.cpan.org/perldoc?Sys%3A%3ASigAction">Sys::SigAction</a> &/or <a href="http://search.cpan.org/perldoc?Time%3A%3AOut">Time::Out</a> might well, IMO, prove useful to you. A user level tha... note Thu, 17 Apr 2014 09:41:00 +0000 http://perlmonks.org/index.pl?node_id=1082616 1082616 264639 2014-04-17 05:41:00 Bloodnok Re^3: Extracting multiple column from csv file and adding/appending onto new csv file with first columns already existing Yaerox http://perlmonks.org/index.pl?node_id=1082615 Yeah you're right. Found it ;-) But I think the way how to get this done can be pretty the same ... if not feel free to tell me :-) Thank you Sir.... note Thu, 17 Apr 2014 09:38:31 +0000 http://perlmonks.org/index.pl?node_id=1082615 1082615 1081946 2014-04-17 05:38:31 Yaerox Re^2: Extracting multiple column from csv file and adding/appending onto new csv file with first columns already existing Bloodnok http://perlmonks.org/index.pl?node_id=1082613 <a href="?node=Yaerox">Yaerox</a>, I think you'll find that the host IP is initially a script argument and is then subsequently returned by the invoked CISCO show command (IIRC :-). ... note Thu, 17 Apr 2014 09:30:50 +0000 http://perlmonks.org/index.pl?node_id=1082613 1082613 264639 2014-04-17 05:30:50 Bloodnok perl5db.pl (Was Re^3: How to get line ranges of subroutines from Perl source code) rockyb http://perlmonks.org/index.pl?node_id=1082612 By the way, I followed that perl5db.pl link and was both in awe of it, and frankly a little repulsed by it. There is way more stuff in perl5db when I first learned it decades ago. I think... note Thu, 17 Apr 2014 09:30:25 +0000 http://perlmonks.org/index.pl?node_id=1082612 1082612 985538 2014-04-17 05:30:25 rockyb Re^4: Perl Directory file extension stats. sidsinha http://perlmonks.org/index.pl?node_id=1082611 Excellent! Exactly what I wanted. THanks a lot, been learning a lot from this forum!... note Thu, 17 Apr 2014 09:25:51 +0000 http://perlmonks.org/index.pl?node_id=1082611 1082611 1045167 2014-04-17 05:25:51 sidsinha Re: Extracting multiple column from csv file and adding/appending onto new csv file with first columns already existing Yaerox http://perlmonks.org/index.pl?node_id=1082610 I can't follow where Host/Device IP is cooming from. I guess this shows that you want to merge two csv files? I never worked on Solaris 10, but why not looking for .tar.gz and then using ta... note Thu, 17 Apr 2014 09:08:10 +0000 http://perlmonks.org/index.pl?node_id=1082610 1082610 1081946 2014-04-17 05:08:10 Yaerox Re: Replace text in file Yaerox http://perlmonks.org/index.pl?node_id=1082608 Maybe another possible way for you could be using perl native function <a href="http://perldoc.perl.org/functions/substr.html">substr()</a> instead of using regular expressions. Laurent_R already explained tho... note Thu, 17 Apr 2014 08:18:50 +0000 http://perlmonks.org/index.pl?node_id=1082608 1082608 1081946 2014-04-17 04:18:50 Yaerox Re^4: How to get the path coverage (or lines of code executed) after running a perl test file perl_help26 http://perlmonks.org/index.pl?node_id=1082607 Thanks Dave... But should I manually install the earlier version or does cpan work? Can you please help me with the steps cz I've never really done this before. Thanks again... note Thu, 17 Apr 2014 08:01:02 +0000 http://perlmonks.org/index.pl?node_id=1082607 1082607 1071933 2014-04-17 04:01:02 perl_help26 Re: Comparing results of math operations Anonymous Monk http://perlmonks.org/index.pl?node_id=1082606 The 0.95 * 806, 1.3 * 589 example; gives me 765.699999999999932 765.700000000000045 when I use the 10-digit calculator trick of subtracting off the leading digits and multi... note Thu, 17 Apr 2014 07:59:12 +0000 http://perlmonks.org/index.pl?node_id=1082606 1082606 961 2014-04-17 03:59:12 Anonymous Monk Re: Replace text in file Laurent_R http://perlmonks.org/index.pl?node_id=1082605 There are numerous ways to achieve what you want. For the substitution itself, the only thing that might be slightly beyond a pure beginner's knowledge, the first idea that comes to mind is to use the... note Thu, 17 Apr 2014 07:45:51 +0000 http://perlmonks.org/index.pl?node_id=1082605 1082605 992570 2014-04-17 03:45:51 Laurent_R Re: removing duplicates from an array of hashes vinoth.ree http://perlmonks.org/index.pl?node_id=1082604 Hi, Here is another way of removing duplicate elements from array of hash. use strict; use warnings; use Data::Dumper; my $ref = &#91;&#93;; $ref->&#91;0&#93; = { id => 'a' }; $ref-><a href="?node=1">1</a> = ... note Thu, 17 Apr 2014 07:26:19 +0000 http://perlmonks.org/index.pl?node_id=1082604 1082604 734134 2014-04-17 03:26:19 vinoth.ree Re^5: OLE::Storage_Lite problems Anonymous Monk http://perlmonks.org/index.pl?node_id=1082603 What setting are you using with strings? when I use strings I see the same data but slightly re-ordered. No setting... note Thu, 17 Apr 2014 07:18:20 +0000 http://perlmonks.org/index.pl?node_id=1082603 1082603 961 2014-04-17 03:18:20 Anonymous Monk Re: Replace text in file kcott http://perlmonks.org/index.pl?node_id=1082600 G'day <a href="?node=snackpie">snackpie</a>, Welcome to the monastery. There should sufficient information in (or linked from) "<a href="http://perldoc.perl.org/perlintro.html">Perl introduction for beginners</a>" to... note Thu, 17 Apr 2014 07:00:19 +0000 http://perlmonks.org/index.pl?node_id=1082600 1082600 861371 2014-04-17 03:00:19 kcott Re: Replace text in file GrandFather http://perlmonks.org/index.pl?node_id=1082599 So what did you try already and how did it fail? If you haven't tried anything, what is the first thing you are having trouble with? Perl is the ... note Thu, 17 Apr 2014 06:54:24 +0000 http://perlmonks.org/index.pl?node_id=1082599 1082599 461912 2014-04-17 02:54:24 GrandFather Re^2: removing duplicates from an array of hashes bigj http://perlmonks.org/index.pl?node_id=1082597 Disadvantage is that delete works good on hashes, but "bad" (and deprecated) on arrays. It does not really delete an entry but just undefs it (with the exception when it is the last element(s), so it ... note Thu, 17 Apr 2014 06:41:02 +0000 http://perlmonks.org/index.pl?node_id=1082597 1082597 203656 2014-04-17 02:41:02 bigj Re^3: Help required in find command. kcott http://perlmonks.org/index.pl?node_id=1082593 Your OP is virtually unreadable so I don't actually know what your problem is. The only place in the entire thread that the string 'View Name' appears is in your regex (i.e. ... note Thu, 17 Apr 2014 06:06:31 +0000 http://perlmonks.org/index.pl?node_id=1082593 1082593 861371 2014-04-17 02:06:31 kcott Re: removing duplicates from an array of hashes NetWallah http://perlmonks.org/index.pl?node_id=1082591 In-place TIMTOWTDI using 'delete', inspired by <a href="?node=bigi">bigi</a> (++): perl -MData::Dumper -E 'my $r=<a href="?node=map%20%7B%20id%3D%3E%24_%20%7D%2C%20%28%22a%22..%22c%22%2C%22b%22%29">map { id=&gt;$_ }, (&quot;a&quot;..&quot;c&quot;,&quot;b&quot;)</a>; say Dumper $r; my %h; $h{$r-><a href="?node=%24_">$_</a>{id}}++ and del... note Thu, 17 Apr 2014 05:32:39 +0000 http://perlmonks.org/index.pl?node_id=1082591 1082591 159887 2014-04-17 01:32:39 NetWallah Re: run shell command as another user kcott http://perlmonks.org/index.pl?node_id=1082590 G'day <a href="?node=ox1d0">ox1d0</a>, Welcome to the monastery. You need some basic debugging here. If system ("su -l - $user -c \'$action > DBlist.txt && cat DBlist.txt\'"); ... note Thu, 17 Apr 2014 05:15:25 +0000 http://perlmonks.org/index.pl?node_id=1082590 1082590 861371 2014-04-17 01:15:25 kcott girishperl girishperl http://perlmonks.org/index.pl?node_id=1082601 user Thu, 17 Apr 2014 07:14:43 +0000 http://perlmonks.org/index.pl?node_id=1082601 1082601 1082601 2014-04-17 03:14:43 girishperl snackpie snackpie http://perlmonks.org/index.pl?node_id=1082595 user Thu, 17 Apr 2014 06:29:14 +0000 http://perlmonks.org/index.pl?node_id=1082595 1082595 1082595 2014-04-17 02:29:14 snackpie