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-09-18 20:23:07 rss,clean Thu Sep 18 10:23:07 2014 30 20140918102307 Thu Sep 18 10:23:07 2014 http://perlmonks.org/ Anonymous Monk Passing arguments to event handlers in WxPerl pwn01 http://perlmonks.org/index.pl?node_id=1101102 I'm trying to retool to Perl from Ansi C (dabbled only slightly in C++ years ago.) I am writing an app that uses a database. I pull the needed data from the database at the beginning of Package M... perlquestion Thu, 18 Sep 2014 18:44:06 +0000 http://perlmonks.org/index.pl?node_id=1101102 1101102 1101075 2014-09-18 14:44:06 pwn01 Duplicate XML Node Question omegaweaponZ http://perlmonks.org/index.pl?node_id=1101087 Hi all, I have a question in how to handle parsing out node values that have the same title. Right now when I use Lib XML it finds the nodes, but dumps them altogether as one string. I need to be ab... perlquestion Thu, 18 Sep 2014 16:58:18 +0000 http://perlmonks.org/index.pl?node_id=1101087 1101087 945984 2014-09-18 12:58:18 omegaweaponZ Perl: Regular Expression sravs448 http://perlmonks.org/index.pl?node_id=1101086 Hi Monks, I have an array of files. Each file with few lines of text, out of which I am trying to get few specific strings through regex in perl Update: Updated as per Choroba's suggestion. ... perlquestion Thu, 18 Sep 2014 16:58:17 +0000 http://perlmonks.org/index.pl?node_id=1101086 1101086 1096125 2014-09-18 12:58:17 sravs448 DBI false error kyledba2013 http://perlmonks.org/index.pl?node_id=1101082 First off, if you are reading this you have already given some of your time to help solve the problem. Therefore, thank you. Secondly, to put to give you some background of my Perl... perlquestion Thu, 18 Sep 2014 16:34:47 +0000 http://perlmonks.org/index.pl?node_id=1101082 1101082 1101070 2014-09-18 12:34:47 kyledba2013 Strange SSH Behavior via system or exec cmv http://perlmonks.org/index.pl?node_id=1101061 Hi Monks- I can't explain this and need guidance from wiser minds - please help. Heres how to reproduce: 1.) Setup ssh public/private keys so that this unix shell command works with... perlquestion Thu, 18 Sep 2014 14:57:07 +0000 http://perlmonks.org/index.pl?node_id=1101061 1101061 499232 2014-09-18 10:57:07 cmv Reaped: ysl muse NodeReaper http://perlmonks.org/index.pl?node_id=1101096 This node was taken out by the <a href="?node=NodeReaper">NodeReaper</a> on Sep 18, 2014 at 17:53&nbsp;UTCReason: &#91;<a href="?node=Your%20Mother">Your Mother</a>&#93;: CLEVER SPAMYou may view &#91;href://?node=Visit%20Reaped%20Nodes&nodenum=1101096|the or... perlnews Thu, 18 Sep 2014 17:33:54 +0000 http://perlmonks.org/index.pl?node_id=1101096 1101096 52855 2014-09-18 13:33:54 NodeReaper Reaped: ʥ ˥󥰥` NodeReaper http://perlmonks.org/index.pl?node_id=1101091 This node was taken out by the <a href="?node=NodeReaper">NodeReaper</a> on Sep 18, 2014 at 17:23&nbsp;UTCReason: &#91;<a href="?node=Corion">Corion</a>&#93;: reap: spamYou may view &#91;href://?node=Visit%20Reaped%20Nodes&nodenum=1101091|the original... poem Thu, 18 Sep 2014 17:02:57 +0000 http://perlmonks.org/index.pl?node_id=1101091 1101091 52855 2014-09-18 13:02:57 NodeReaper Reaped: ` rӋ NodeReaper http://perlmonks.org/index.pl?node_id=1101090 This node was taken out by the <a href="?node=NodeReaper">NodeReaper</a> on Sep 18, 2014 at 17:23&nbsp;UTCReason: &#91;<a href="?node=Corion">Corion</a>&#93;: reap: spamYou may view &#91;href://?node=Visit%20Reaped%20Nodes&nodenum=1101090|the original... poem Thu, 18 Sep 2014 17:02:51 +0000 http://perlmonks.org/index.pl?node_id=1101090 1101090 52855 2014-09-18 13:02:51 NodeReaper Reaped: å`ѥ NodeReaper http://perlmonks.org/index.pl?node_id=1101080 This node was taken out by the <a href="?node=NodeReaper">NodeReaper</a> on Sep 18, 2014 at 16:46&nbsp;UTCReason: &#91;<a href="?node=Corion">Corion</a>&#93;: reap: spamYou may view &#91;href://?node=Visit%20Reaped%20Nodes&nodenum=1101080|the original... poem Thu, 18 Sep 2014 16:27:44 +0000 http://perlmonks.org/index.pl?node_id=1101080 1101080 52855 2014-09-18 12:27:44 NodeReaper Re^3: Passing arguments to event handlers in WxPerl zentara http://perlmonks.org/index.pl?node_id=1101109 Can you make a working code example, that dosn't use any OO program? That would identify wheter it's a Wx problem, or an improper object model which you use. You could also check the reference typ... note Thu, 18 Sep 2014 20:10:52 +0000 http://perlmonks.org/index.pl?node_id=1101109 1101109 131741 2014-09-18 16:10:52 zentara Re^3: fetchrow_array loop in perl 5.10 erix http://perlmonks.org/index.pl?node_id=1101108 See perhaps, <a href="?node_id=594175">DBI, fork, and clone.</a> I can't tell if applicable to those problems (yours and that of the OP), but interesting anyway :) ... note Thu, 18 Sep 2014 19:54:52 +0000 http://perlmonks.org/index.pl?node_id=1101108 1101108 399498 2014-09-18 15:54:52 erix Re^2: Passing arguments to event handlers in WxPerl pwn01 http://perlmonks.org/index.pl?node_id=1101107 Sorry about the misunderstanding. This is just one package from the code. There is a little more. I can post all of it if you would like. You will have trouble running it without my database. ... note Thu, 18 Sep 2014 19:40:40 +0000 http://perlmonks.org/index.pl?node_id=1101107 1101107 1101075 2014-09-18 15:40:40 pwn01 Re^2: fetchrow_array loop in perl 5.10 bulrush http://perlmonks.org/index.pl?node_id=1101106 Depending on (the version of) your database driver, it might be that your database driver does not like more than one statement handle being active at the same time. Yep, that's what happ... note Thu, 18 Sep 2014 19:33:20 +0000 http://perlmonks.org/index.pl?node_id=1101106 1101106 756396 2014-09-18 15:33:20 bulrush Re: Passing arguments to event handlers in WxPerl zentara http://perlmonks.org/index.pl?node_id=1101105 I basically need to get the selected combo box entry to the event handler sub I can't run your code, but from the question, I will offer this. In most GUI's, the widget that sends the event... note Thu, 18 Sep 2014 19:25:51 +0000 http://perlmonks.org/index.pl?node_id=1101105 1101105 131741 2014-09-18 15:25:51 zentara Re^3: pdftk encryption function roboticus http://perlmonks.org/index.pl?node_id=1101101 <a href="?node=sumalatha">sumalatha</a>: Please read my post again--I told you how you may resolve it. ...<a href="?node=roboticus">roboticus</a> When your only tool is a hammer, all problems look like your thumb.... note Thu, 18 Sep 2014 18:33:31 +0000 http://perlmonks.org/index.pl?node_id=1101101 1101101 533863 2014-09-18 14:33:31 roboticus Re^3: Cannot get enable> mode to work VinsWorldcom http://perlmonks.org/index.pl?node_id=1101100 <a href="http://search.cpan.org/search?mode=module&amp;query=Net%3A%3ATelnet%3A%3ACisco">Net::Telnet::Cisco</a> subclasses Net::Telnet, so everything you have in Net::Telnet is actually available in Net::Telnet::Cisco.... note Thu, 18 Sep 2014 18:14:40 +0000 http://perlmonks.org/index.pl?node_id=1101100 1101100 749850 2014-09-18 14:14:40 VinsWorldcom Re: How to convert between decimal and binary for negative numbers? Laurent_R http://perlmonks.org/index.pl?node_id=1101099 Hi, if your numbers are integers (all your examples are integers), it might be easier to use the %b and %d modifiers of the printf or sprintf functions, as shown in the fol... note Thu, 18 Sep 2014 17:52:09 +0000 http://perlmonks.org/index.pl?node_id=1101099 1101099 992570 2014-09-18 13:52:09 Laurent_R Re: ^CSIGINT handler "my_handler" not defined. Sigtrap is not able to find handler function. Mr. Muskrat http://perlmonks.org/index.pl?node_id=1101098 You need to provide more context if you want help but reduce it down to a minimal example that still does not work. Here's my minimal yet working example: #!/bin/env perl use strict; ... note Thu, 18 Sep 2014 17:49:54 +0000 http://perlmonks.org/index.pl?node_id=1101098 1101098 155876 2014-09-18 13:49:54 Mr. Muskrat Re^2: Duplicate XML Node Question omegaweaponZ http://perlmonks.org/index.pl?node_id=1101097 Makes perfect sense, that's exactly what I needed to do. Thanks!... note Thu, 18 Sep 2014 17:38:12 +0000 http://perlmonks.org/index.pl?node_id=1101097 1101097 945984 2014-09-18 13:38:12 omegaweaponZ Re^3: spaces in shell commands ( Win32::ShellQuote ) Anonymous Monk http://perlmonks.org/index.pl?node_id=1101095 Does the execv emulation used by perl internally take care of quoting the arguments properly? As far as I can tell Perl doesn't emulate execv and ... note Thu, 18 Sep 2014 17:32:41 +0000 http://perlmonks.org/index.pl?node_id=1101095 1101095 961 2014-09-18 13:32:41 Anonymous Monk Re: Duplicate XML Node Question choroba http://perlmonks.org/index.pl?node_id=1101094 findnodes returns a node list. You have to iterate over it the same way you already did for the parent node: for my $test ($xml->findnodes('/parent_node')) { for my $mystring ($test-... note Thu, 18 Sep 2014 17:14:09 +0000 http://perlmonks.org/index.pl?node_id=1101094 1101094 832495 2014-09-18 13:14:09 choroba Re: Perl: Regular Expression choroba http://perlmonks.org/index.pl?node_id=1101093 You opened the file correctly (some could say there are safer ways, as the 3-argument form of <a href="http://perldoc.perl.org/functions/open.html">open</a> with a lexical filehandle), but you didn't read from it at all. You used my $line =~ / ... note Thu, 18 Sep 2014 17:08:37 +0000 http://perlmonks.org/index.pl?node_id=1101093 1101093 832495 2014-09-18 13:08:37 choroba Re: Perl: Regular Expression Anonymous Monk http://perlmonks.org/index.pl?node_id=1101092 For the <a href="?node_id=1100829">third</a> <a href="?node_id=1100964">time</a>: post code that compiles.... note Thu, 18 Sep 2014 17:05:45 +0000 http://perlmonks.org/index.pl?node_id=1101092 1101092 961 2014-09-18 13:05:45 Anonymous Monk Re: DBI false error hippo http://perlmonks.org/index.pl?node_id=1101089 The documentation for <a href="http://search.cpan.org/perldoc?DBI">DBI</a> is pretty clear on the return value of do and it says: Prepare and execute a single statement. Returns the number of rows ... note Thu, 18 Sep 2014 16:59:55 +0000 http://perlmonks.org/index.pl?node_id=1101089 1101089 885521 2014-09-18 12:59:55 hippo Re^2: Cannot get enable> mode to work ArifS http://perlmonks.org/index.pl?node_id=1101088 I am trying to avoid net::telnet::cisco, as it doesn't give all the features, and had much more luck with the net::telnet. Anything wrong in the following format? - # authentic... note Thu, 18 Sep 2014 16:58:53 +0000 http://perlmonks.org/index.pl?node_id=1101088 1101088 1098998 2014-09-18 12:58:53 ArifS Re^3: Strange SSH Behavior via system or exec Anonymous Monk http://perlmonks.org/index.pl?node_id=1101085 Either you give <a href="http://perldoc.perl.org/functions/system.html">system</a> a single argument, which is the equivalent of giving that string to the shell to be executed (e.g. /bin/sh -c 'foo bar quz'), or you give <a href="http://perldoc.perl.org/functions/system.html">system</a>... note Thu, 18 Sep 2014 16:57:32 +0000 http://perlmonks.org/index.pl?node_id=1101085 1101085 961 2014-09-18 12:57:32 Anonymous Monk Re^5: Strange SSH Behavior via system or exec Anonymous Monk http://perlmonks.org/index.pl?node_id=1101084 As soon as you give <a href="http://perldoc.perl.org/functions/system.html">system</a> more than one arg, it does not invoke the shell (see also <a href="http://perldoc.perl.org/functions/exec.html">exec</a>), meaning that the arguments such as "-l usr" are passed on to ssh without in... note Thu, 18 Sep 2014 16:40:19 +0000 http://perlmonks.org/index.pl?node_id=1101084 1101084 961 2014-09-18 12:40:19 Anonymous Monk Re^2: Load XML issues Elegant http://perlmonks.org/index.pl?node_id=1101083 That did it! Thanks! To think I simply missed a quote... Man, I must have been tired...... note Thu, 18 Sep 2014 16:37:32 +0000 http://perlmonks.org/index.pl?node_id=1101083 1101083 1100349 2014-09-18 12:37:32 Elegant Re^4: Strange SSH Behavior via system or exec jellisii2 http://perlmonks.org/index.pl?node_id=1101081 If this were the case, wouldn't the second case fail as well? $ perl -e 'system("ssh -l usr remotehost date") # works ... note Thu, 18 Sep 2014 16:31:45 +0000 http://perlmonks.org/index.pl?node_id=1101081 1101081 554517 2014-09-18 12:31:45 jellisii2 Re: Cannot get enable> mode to work VinsWorldcom http://perlmonks.org/index.pl?node_id=1101079 I see "enable" - is this a Cisco device? Try <a href="http://search.cpan.org/search?mode=module&amp;query=Net%3A%3ATelnet%3A%3ACisco">Net::Telnet::Cisco</a> which handles the Cisco-specific prompts and makes Telnet to Cisco devices easier than just using Net::Telnet by itself.... note Thu, 18 Sep 2014 16:16:03 +0000 http://perlmonks.org/index.pl?node_id=1101079 1101079 749850 2014-09-18 12:16:03 VinsWorldcom Re: Catalyst Framework - target tt2 view Your Mother http://perlmonks.org/index.pl?node_id=1101074 Besides changing the view, as suggested, if youre using sub end : ActionClass('RenderView') {}, <a href="http://search.cpan.org/perldoc?Catalyst%3A%3AAction%3A%3ARenderView">Catalyst::Action::RenderView</a>and you probably should bethen all you have to do is wr... note Thu, 18 Sep 2014 15:46:32 +0000 http://perlmonks.org/index.pl?node_id=1101074 1101074 248054 2014-09-18 11:46:32 Your Mother Re^2: How to run a perl script from a cgi page and track its status ? chidori http://perlmonks.org/index.pl?node_id=1101073 Ok , I am planning to go with system command , will send the command to background and also redirect the the output to log like shown below. system(myscript >myoutput.log 2>&1 &)... note Thu, 18 Sep 2014 15:44:54 +0000 http://perlmonks.org/index.pl?node_id=1101073 1101073 1063758 2014-09-18 11:44:54 chidori Re^6: fetchrow_array loop in perl 5.10 Anonymous Monk http://perlmonks.org/index.pl?node_id=1101072 DME::DB::db=HASH(0x80861070) trace level set to 0x0/1 (DBI @ 0x0/0) in DBI 1.631-ithread (pid 11755) FETCH('private_dbcharset')= 'UTF8' ('private_dbcharset' from cache) at DB.pm line ... note Thu, 18 Sep 2014 15:44:37 +0000 http://perlmonks.org/index.pl?node_id=1101072 1101072 961 2014-09-18 11:44:37 Anonymous Monk Re^3: Strange SSH Behavior via system or exec salva http://perlmonks.org/index.pl?node_id=1101067 perl -e 'system("ssh", "-lusr", "remotehost", "date")' works but... perl -e 'system("ssh", "-l usr", "remotehost", "date")' doesn't because it tries to log as user " usr... note Thu, 18 Sep 2014 15:26:01 +0000 http://perlmonks.org/index.pl?node_id=1101067 1101067 446266 2014-09-18 11:26:01 salva Re^2: Strange SSH Behavior via system or exec cmv http://perlmonks.org/index.pl?node_id=1101066 ++<a href="?node=choroba">choroba</a> That works! Thanks. However, shouldn't both work, or am I missing something? -Craig... note Thu, 18 Sep 2014 15:20:32 +0000 http://perlmonks.org/index.pl?node_id=1101066 1101066 499232 2014-09-18 11:20:32 cmv Re^3: How to convert between decimal and binary for negative numbers? BrowserUk http://perlmonks.org/index.pl?node_id=1101065 But I was trying to get a solution for small negative numbers, no more than -127 which is the limit of 8 bit int. If you want to <a href="?node=pack">pack</a> 8-bit numbers, do not ... note Thu, 18 Sep 2014 15:09:38 +0000 http://perlmonks.org/index.pl?node_id=1101065 1101065 171588 2014-09-18 11:09:38 BrowserUk Re^8: XML::Twig and file encoding slugger415 http://perlmonks.org/index.pl?node_id=1101064 hm I seem to be getting better results by removing 'keep_encoding'... that doesn't make sense, so I'm clearly not understanding how that's supposed to work.forward...... note Thu, 18 Sep 2014 15:09:21 +0000 http://perlmonks.org/index.pl?node_id=1101064 1101064 845976 2014-09-18 11:09:21 slugger415 Re: Strange SSH Behavior via system or exec choroba http://perlmonks.org/index.pl?node_id=1101063 Also try perl -e 'system("ssh", "-l", "usr", "remotehost", "date")' &#1604;... note Thu, 18 Sep 2014 15:08:58 +0000 http://perlmonks.org/index.pl?node_id=1101063 1101063 832495 2014-09-18 11:08:58 choroba Re^5: fetchrow_array loop in perl 5.10 mje http://perlmonks.org/index.pl?node_id=1101062 I would have preferred to see a bit more than this. I cannot help any further based on that log. Not enough context.... note Thu, 18 Sep 2014 15:08:44 +0000 http://perlmonks.org/index.pl?node_id=1101062 1101062 492557 2014-09-18 11:08:44 mje Re^2: How to convert between decimal and binary for negative numbers? thanos1983 http://perlmonks.org/index.pl?node_id=1101060 Hello BrowserUk Thank you for your time and effort to help me with my problem. Thank you for the tip. Based on my code if I am using an int size 32 bit works fine. But I was try... note Thu, 18 Sep 2014 14:48:29 +0000 http://perlmonks.org/index.pl?node_id=1101060 1101060 1069339 2014-09-18 10:48:29 thanos1983 willsilva8611 willsilva8611 http://perlmonks.org/index.pl?node_id=1101103 user Thu, 18 Sep 2014 18:51:35 +0000 http://perlmonks.org/index.pl?node_id=1101103 1101103 1101103 2014-09-18 14:51:35 willsilva8611 dboyeau dboyeau http://perlmonks.org/index.pl?node_id=1101077 user Thu, 18 Sep 2014 16:15:46 +0000 http://perlmonks.org/index.pl?node_id=1101077 1101077 1101077 2014-09-18 12:15:46 dboyeau pwn01 pwn01 http://perlmonks.org/index.pl?node_id=1101075 user Thu, 18 Sep 2014 16:12:23 +0000 http://perlmonks.org/index.pl?node_id=1101075 1101075 1101075 2014-09-18 12:12:23 pwn01 kyledba2013 kyledba2013 http://perlmonks.org/index.pl?node_id=1101070 user Thu, 18 Sep 2014 15:41:22 +0000 http://perlmonks.org/index.pl?node_id=1101070 1101070 1101070 2014-09-18 11:41:22 kyledba2013 999_Shawn 999_Shawn http://perlmonks.org/index.pl?node_id=1101068 user Thu, 18 Sep 2014 15:33:56 +0000 http://perlmonks.org/index.pl?node_id=1101068 1101068 1101068 2014-09-18 11:33:56 999_Shawn