perl.beginners http://www.nntp.perl.org/group/perl.beginners/ ... Copyright 1998-2014 perl.org Sun, 20 Apr 2014 09:47:52 +0000 ask@perl.org Re: Do 5.18.2 functions is and isnt exist? by Shawn H Corey On Sat, 19 Apr 2014 09:30:40 -0600<br/>Sherman Willden &lt;sherman.willden@gmail.com&gt; wrote:<br/><br/>&gt; I have been reading Modern Perl and in several instances they use is<br/>&gt; and isnt. Are these functions available in Perl? I looked at<br/>&gt; http://perldoc.perl.org/index-functions.html and couldn&#39;t find them.<br/>&gt; Two usage examples are shown below.<br/>&gt; <br/>&gt; isnt( $i, &#39;pig&#39;, &#39;$i overwritten with a number&#39; );<br/>&gt; <br/>&gt; is( $nums[9], 100, &#39;10 * 10 is 100&#39; );<br/>&gt; <br/>&gt; Thank you;<br/>&gt; <br/>&gt; Sherman<br/><br/>Those are function of Test::More. See `perldoc Test::More` for details.<br/><br/><br/>-- <br/>Don&#39;t stop where the ink does.<br/> Shawn<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124283.html Sat, 19 Apr 2014 15:36:39 +0000 Do 5.18.2 functions is and isnt exist? by Sherman Willden I have been reading Modern Perl and in several instances they use is and<br/>isnt. Are these functions available in Perl? I looked at<br/>http://perldoc.perl.org/index-functions.html and couldn&#39;t find them. Two<br/>usage examples are shown below.<br/><br/>isnt( $i, &#39;pig&#39;, &#39;$i overwritten with a number&#39; );<br/><br/>is( $nums[9], 100, &#39;10 * 10 is 100&#39; );<br/><br/>Thank you;<br/><br/>Sherman<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124282.html Sat, 19 Apr 2014 15:30:48 +0000 Re: split an html file by Maurice McCarthy On 2014-04-17 18:01, Mike McClain wrote:<br/>&gt; Hi,<br/>&gt; My brother Rick, a windrider, put together a webpage,<br/>&gt; http://www.photographers1.com/Sailing/NauticalTerms&amp;Nomenclature.html<br/>&gt; about sailing and wind surfing that has grown too large and should be<br/>&gt; split into smaller sections to reduce load time.<br/>&gt; Can anyone point me to any tools/modules that would automate the<br/>&gt; process of fixing all the links?<br/>&gt; Thanks,<br/>&gt; Mike<br/>&gt; --<br/>&gt; Why is it that all of the instruments seeking intelligent life<br/>&gt; in the universe are pointed away from Earth?<br/><br/><br/>Hi,<br/><br/>I&#39;m only a beginner in Perl myself so I don&#39;t know the perl tool or <br/>module but I&#39;d imagine that the html editor Bluefish would make this <br/>fairly easy, but not automatic. Split your page into several, then lets <br/>assume there is one page per letter of the alphabet. You can select all <br/>pages as separate tabs and change all references from &lt;present-url&gt;#A to <br/>&lt;pageA-url&gt;.<br/><br/>Just an idea<br/>Moss<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124281.html Sat, 19 Apr 2014 07:31:08 +0000 Re: split an html file by Shlomi Fish Hi Mike,<br/><br/>On Thu, 17 Apr 2014 10:01:35 -0700<br/>Mike McClain &lt;mike.junk@nethere.com&gt; wrote:<br/><br/>&gt; Hi,<br/>&gt; My brother Rick, a windrider, put together a webpage,<br/>&gt; http://www.photographers1.com/Sailing/NauticalTerms&amp;Nomenclature.html<br/>&gt; about sailing and wind surfing that has grown too large and should be<br/>&gt; split into smaller sections to reduce load time.<br/>&gt; Can anyone point me to any tools/modules that would automate the<br/>&gt; process of fixing all the links?<br/><br/>Not sure if there&#39;s anything ready made, but you can use an HTML<br/>parsing/manipulation module or framework. See:<br/><br/>* http://perl-begin.org/uses/text-parsing/<br/><br/>* http://perl-begin.org/uses/web-automation/<br/><br/>(*Note*: perl-begin.org is a site I originated and maintain).<br/><br/>And write some code using it.<br/><br/>Before you do all that, it is a good idea to make sure the HTML markup<br/>validates so the parser will have an easier time:<br/><br/>* http://perl-begin.org/tutorials/bad-elements/#generating_non_valid_markup<br/><br/>See:<br/><br/>http://validator.w3.org/check?uri=http%3A%2F%2Fwww.photographers1.com%2FSailing%2FNauticalTerms%26Nomenclature.html<br/><br/>Perhaps https://metacpan.org/pod/HTML::Tidy and<br/>https://github.com/petdance/tidyp will prove of utility.<br/><br/>Regards,<br/><br/> Shlomi Fish<br/><br/>-- <br/>-----------------------------------------------------------------<br/>Shlomi Fish http://www.shlomifish.org/<br/>Optimising Code for Speed - http://shlom.in/optimise<br/><br/>The apple completely supplanted the tree.<br/> &mdash; http://www.shlomifish.org/humour/Summerschool-at-the-NSA/<br/><br/>Please reply to list if it&#39;s a mailing list post - http://shlom.in/reply .<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124280.html Sat, 19 Apr 2014 07:15:57 +0000 split an html file by Mike McClain Hi,<br/> My brother Rick, a windrider, put together a webpage,<br/>http://www.photographers1.com/Sailing/NauticalTerms&amp;Nomenclature.html<br/>about sailing and wind surfing that has grown too large and should be<br/>split into smaller sections to reduce load time.<br/> Can anyone point me to any tools/modules that would automate the<br/>process of fixing all the links?<br/>Thanks,<br/>Mike<br/>--<br/>Why is it that all of the instruments seeking intelligent life<br/>in the universe are pointed away from Earth?<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124279.html Sat, 19 Apr 2014 06:44:49 +0000 RE: Installation of Perl 5.18.2 on hpux 11.23 by Braly, Larissa I downloaded from cpan (http://www.cpan.org/src/README.html). I did try it on 11.31 as well as 11.23 (both itanium). both were giving me the same issues. <br/> <br/> <br/> <br/>Thanks! <br/> <br/> <br/> <br/> <br/> <br/>From: Paul.G [mailto:medura43@yahoo.com.au] <br/>Sent: Tuesday, April 08, 2014 12:30 AM <br/>To: Braly, Larissa (NE); the <br/>Subject: Re: Installation of Perl 5.18.2 on hpux 11.23 <br/> <br/> <br/> <br/>Hi Larissa <br/> <br/> <br/> <br/>Where did you get your copy of perl 5.18.2 ? <br/> <br/> <br/> <br/>I found this link below if it helps. <br/> <br/> <br/> <br/> http://mirrors.develooper.com/hpux/ <br/> <br/> <br/> <br/>We have HP-UX 11.31, which should be similar to HP-UX 11.23. <br/> <br/> <br/> <br/>11.23 ran on both PA-Risc and Itanium. <br/> <br/> <br/> <br/>Are you running a PA-Risc or Itanium processor? <br/> <br/> <br/> <br/>Haven&#39;t tried to update perl, but would be interested in giving it a go. <br/> <br/> <br/> <br/> <br/> <br/>Regards <br/> <br/> <br/> <br/>Paul <br/> <br/>On Tuesday, 8 April 2014 12:25 PM, &quot;Braly, Larissa (NE)&quot; &lt;Larissa.Braly@GDIT.com&lt;mailto:Larissa.Braly@GDIT.com&gt;&gt; wrote: <br/> <br/>When attempting to install perl 5.18.2 on hpux 11.23, I receive errors during make test. <br/> <br/> <br/> <br/>** errors after initial make test: <br/> <br/> Failed 4 tests out of 2242, 99.82% okay. <br/> <br/> ../cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t <br/> <br/> ../cpan/ExtUtils-Constant/t/Constant.t <br/> <br/> ../cpan/ExtUtils-MakeMaker/t/xs.t *** <br/> <br/> ../dist/Net-Ping/t/510_ping_udp.t <br/> <br/> <br/> <br/> <br/> <br/>export LD_LIBRARY_PATH=`pwd` <br/> <br/>cd t <br/> <br/>./perl -I../lib ../cpan/ExtUtils-MakeMaker/t/xs.t <br/> <br/> <br/> <br/>Can&#39;t locate ExtUtils/MakeMaker.pm in @INC (you may need to install the ExtUtils::MakeMaker module) (@INC contains: /usr/cmos/script /opt/perl518/lib/site_perl/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/site_perl/5.18.2 /opt/perl518/lib/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/5.18.2 .) at Makefile.PL line 2. <br/> <br/>BEGIN failed--compilation aborted at Makefile.PL line 2. <br/> <br/>not ok 1 # /usr/cmos/serverload/perl-5.18.2/t/perl Makefile.PL failed: 512 <br/> <br/> <br/> <br/>I am running this as root. <br/> <br/>The ExtUtils file does exist. If I include the path to MakeMaker.pm using the &acirc;&#128;&#147;I variable it is giving me a different file that is not included in @INC. <br/> <br/> <br/> <br/>This is what I used for configuration: <br/> <br/>./Configure -Duse64bitall -A prepend libswanted=&#39;cl pthread &#39; -Ubincompat5005 <br/> <br/> <br/> <br/> <br/> <br/>When prompted, I changed the Optimizer mode from &#39;+O2 +Onolimit&#39; to +O1. I have tried it both ways, but am receiving the same errors. <br/> <br/> <br/> <br/> <br/> <br/>Any advice would be appreciated! <br/> <br/> <br/>Thank You, <br/> <br/> <br/>Larissa <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124278.html Wed, 09 Apr 2014 01:55:14 +0000 Re: cannot install DBD::Oracle by Yambu Hi Luca<br/><br/>I had that problem yesterday.<br/><br/>What you need to do is install Oracle instantclient and point the<br/>ORACLE_HOME env variable to the folder with the instantclient.<br/>You can download instantclient on<br/>http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html<br/><br/>regards<br/><br/><br/>On Tue, Apr 8, 2014 at 12:27 AM, Rui Pereira &lt;it.freelancer.pt@gmail.com&gt;wrote:<br/><br/>&gt; Have you tried versions 1.17 or 1.18 of DBD::Oracle?<br/>&gt;<br/>&gt; Your Oracle version appears to be old, newer versions of the module don&#39;t<br/>&gt; support them.<br/>&gt;<br/>&gt;<br/>&gt; Best regards,<br/>&gt; Rui<br/>&gt;<br/>&gt;<br/>&gt; On Wed, Apr 2, 2014 at 10:02 AM, Luca Ferrari &lt;fluca1978@infinito.it&gt;wrote:<br/>&gt;<br/>&gt;&gt; On Wed, Apr 2, 2014 at 9:06 AM, Zapp Prefect &lt;zapp.prefect@gmail.com&gt;<br/>&gt;&gt; wrote:<br/>&gt;&gt; &gt; That means you should Make Sure you have defined the Environment<br/>&gt;&gt; Variable<br/>&gt;&gt; &gt; $ORACLE_HOME First!<br/>&gt;&gt; &gt; Find where you installed the Oracle, and add this into your .bashrc,<br/>&gt;&gt; then<br/>&gt;&gt; &gt; relogin:<br/>&gt;&gt; &gt; export ORACLE_HOME=&quot;/path/to/Oracle&quot;<br/>&gt;&gt;<br/>&gt;&gt; Thanks, but it was clear enough that I was missing ORACLE_HOME, what<br/>&gt;&gt; is not clear to me is to what I have to refer to.<br/>&gt;&gt; Pointing it to the sql developer installation (3.2) presents me this<br/>&gt;&gt; message:<br/>&gt;&gt; [...]<br/>&gt;&gt; Oracle version 8.0.0.0 (8.0)<br/>&gt;&gt; DBD::Oracle no longer supports Oracle client versions before 9.2<br/>&gt;&gt;<br/>&gt;&gt; So what I can understand is that I&#39;m missing sqlplus, that is<br/>&gt;&gt; required. It is a shame, since I believe that the sqldeveloper should<br/>&gt;&gt; embed everything, but I admit I&#39;m not an oracle expert (and I don&#39;t<br/>&gt;&gt; aim to be).<br/>&gt;&gt;<br/>&gt;&gt; Luca<br/>&gt;&gt;<br/>&gt;&gt; --<br/>&gt;&gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt;&gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt;&gt; http://learn.perl.org/<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124277.html Tue, 08 Apr 2014 08:31:23 +0000 Re: Implementation of sFTP using Perl by Wernher Eksteen I preffer to use Net::OpenSSH (<br/>http://search.cpan.org/~salva/Net-OpenSSH-0.60/lib/Net/OpenSSH.pm)<br/><br/>This is an exceptional Perl module on most things SSH related, not limited<br/>to just sFTP which allows the use of various other SSH calls from the same<br/>module without the need to use other modules to fulfill other requirements.<br/>For me this is the swisarmy knife for Perl on SSH related things, it&#39;s<br/>feature rich and simple to use and can do things in parallel.<br/><br/><br/>On Thu, Jan 12, 2012 at 7:16 PM, Wagner, David --- Sr Programmer Analyst<br/>--- CFS &lt;david.wagner@fedex.com&gt; wrote:<br/><br/>&gt;<br/>&gt; I need to change from FTP to sFTP and want to use a Perl<br/>&gt; implementation verses using sFTP application bound within Perl scripts.<br/>&gt; I will be running from Linux and pulling data either from MVS or<br/>&gt; Windows box or servers.<br/>&gt;<br/>&gt; Uncertain how to proceed? Will attempt to use AS Linux Perl<br/>&gt; version.<br/>&gt;<br/>&gt; Thoughts???<br/>&gt;<br/>&gt; Thanks....<br/>&gt;<br/>&gt; Wags ;)<br/>&gt; David R. Wagner<br/>&gt; Senior Programmer Analyst<br/>&gt; FedEx Services<br/>&gt; 1.719.484.2097 Tel<br/>&gt; 1.719.484.2419 Fax<br/>&gt; 1.408.623.5963 Cell<br/>&gt; http://Fedex.com/us<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; --<br/>&gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt; http://learn.perl.org/<br/>&gt;<br/>&gt;<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124276.html Tue, 08 Apr 2014 06:51:39 +0000 Re: Installation of Perl 5.18.2 on hpux 11.23 by Paul.G Hi Larissa<br/>&nbsp;<br/>Where did you&nbsp;get your copy of&nbsp;perl 5.18.2 ?<br/>&nbsp;<br/>I found this link below if it helps.<br/>&nbsp;<br/>&nbsp;http://mirrors.develooper.com/hpux/<br/>&nbsp;<br/>We have HP-UX 11.31, which should be similar to HP-UX 11.23.<br/>&nbsp;<br/>11.23 ran on both PA-Risc and Itanium.<br/>&nbsp;<br/>Are you running a PA-Risc or Itanium processor?<br/>&nbsp;<br/>Haven&#39;t tried to update perl, but would be interested in giving it a go.<br/>&nbsp;<br/>&nbsp;<br/>Regards<br/>&nbsp;<br/>Paul<br/>On Tuesday, 8 April 2014 12:25 PM, &quot;Braly, Larissa (NE)&quot; &lt;Larissa.Braly@GDIT.com&gt; wrote:<br/> <br/> <br/>When attempting to install perl 5.18.2 on hpux 11.23, I receive errors during make test.&nbsp; <br/>&nbsp; <br/>** errors after initial make test: <br/>&nbsp;&nbsp;&nbsp; Failed 4 tests out of 2242, 99.82% okay. <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ../cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ../cpan/ExtUtils-Constant/t/Constant.t <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ../cpan/ExtUtils-MakeMaker/t/xs.t&nbsp; *** <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ../dist/Net-Ping/t/510_ping_udp.t <br/>&nbsp; <br/>&nbsp; <br/>export LD_LIBRARY_PATH=`pwd` <br/>cd t <br/>./perl -I../lib ../cpan/ExtUtils-MakeMaker/t/xs.t <br/>&nbsp; <br/>Can&#39;t locate ExtUtils/MakeMaker.pm in @INC (you may need to install the ExtUtils::MakeMaker module) (@INC contains: /usr/cmos/script /opt/perl518/lib/site_perl/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/site_perl/5.18.2 /opt/perl518/lib/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/5.18.2 .) at Makefile.PL line 2. <br/>BEGIN failed--compilation aborted at Makefile.PL line 2. <br/>not ok 1 # /usr/cmos/serverload/perl-5.18.2/t/perl Makefile.PL failed: 512 <br/>&nbsp; <br/>I am running this as root. <br/>The ExtUtils file does exist.&nbsp; If I include the path to MakeMaker.pm using the &ndash;I variable it is giving me a different file that is not included in @INC.&nbsp; <br/>&nbsp; <br/>This is what I used for configuration:&nbsp; <br/>./Configure -Duse64bitall -A prepend libswanted=&#39;cl pthread &#39; -Ubincompat5005 <br/>&nbsp; <br/>When prompted, I changed the Optimizer mode from &#39;+O2 +Onolimit&#39; to +O1.&nbsp; I have tried it both ways, but am receiving the same errors. &nbsp;&nbsp; <br/>&nbsp; <br/>Any advice would be appreciated!&nbsp; <br/>Thank You, <br/>Larissa<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124275.html Tue, 08 Apr 2014 04:33:26 +0000 RE: Installation of Perl 5.18.2 on hpux 11.23 by Braly, Larissa I apologize. I included the wrong command that I am executing.<br/><br/><br/><br/>I should have included ./perl -I../lib ../cpan/ExtUtils-Constant/t/Constant.t rather than ./perl -I../lib ../cpan/ExtUtils-MakeMaker/t/xs.t<br/><br/><br/><br/><br/><br/>From: Braly, Larissa (NE)<br/>Sent: Monday, April 07, 2014 10:24 PM<br/>To: &#39;the&#39;<br/>Subject: Installation of Perl 5.18.2 on hpux 11.23<br/><br/><br/><br/>When attempting to install perl 5.18.2 on hpux 11.23, I receive errors during make test.<br/><br/><br/><br/>** errors after initial make test:<br/><br/> Failed 4 tests out of 2242, 99.82% okay.<br/><br/> ../cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t<br/><br/> ../cpan/ExtUtils-Constant/t/Constant.t<br/><br/> ../cpan/ExtUtils-MakeMaker/t/xs.t ***<br/><br/> ../dist/Net-Ping/t/510_ping_udp.t<br/><br/><br/><br/><br/><br/>export LD_LIBRARY_PATH=`pwd`<br/><br/>cd t<br/><br/>./perl -I../lib ../cpan/ExtUtils-MakeMaker/t/xs.t<br/><br/><br/><br/>Can&#39;t locate ExtUtils/MakeMaker.pm in @INC (you may need to install the ExtUtils::MakeMaker module) (@INC contains: /usr/cmos/script /opt/perl518/lib/site_perl/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/site_perl/5.18.2 /opt/perl518/lib/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/5.18.2 .) at Makefile.PL line 2.<br/><br/>BEGIN failed--compilation aborted at Makefile.PL line 2.<br/><br/>not ok 1 # /usr/cmos/serverload/perl-5.18.2/t/perl Makefile.PL failed: 512<br/><br/><br/><br/>I am running this as root.<br/><br/>The ExtUtils file does exist. If I include the path to MakeMaker.pm using the -I variable it is giving me a different file that is not included in @INC.<br/><br/><br/><br/>This is what I used for configuration:<br/><br/>./Configure -Duse64bitall -A prepend libswanted=&#39;cl pthread &#39; -Ubincompat5005<br/><br/><br/><br/><br/><br/>When prompted, I changed the Optimizer mode from &#39;+O2 +Onolimit&#39; to +O1. I have tried it both ways, but am receiving the same errors.<br/><br/><br/><br/><br/><br/>Any advice would be appreciated!<br/><br/><br/>Thank You,<br/><br/><br/>Larissa<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124274.html Tue, 08 Apr 2014 02:41:19 +0000 Installation of Perl 5.18.2 on hpux 11.23 by Braly, Larissa When attempting to install perl 5.18.2 on hpux 11.23, I receive errors during make test.<br/><br/><br/><br/>** errors after initial make test:<br/><br/> Failed 4 tests out of 2242, 99.82% okay.<br/><br/> ../cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t<br/><br/> ../cpan/ExtUtils-Constant/t/Constant.t<br/><br/> ../cpan/ExtUtils-MakeMaker/t/xs.t ***<br/><br/> ../dist/Net-Ping/t/510_ping_udp.t<br/><br/><br/><br/><br/><br/>export LD_LIBRARY_PATH=`pwd`<br/><br/>cd t<br/><br/>./perl -I../lib ../cpan/ExtUtils-MakeMaker/t/xs.t<br/><br/><br/><br/>Can&#39;t locate ExtUtils/MakeMaker.pm in @INC (you may need to install the ExtUtils::MakeMaker module) (@INC contains: /usr/cmos/script /opt/perl518/lib/site_perl/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/site_perl/5.18.2 /opt/perl518/lib/5.18.2/IA64.ARCHREV_0-LP64 /opt/perl518/lib/5.18.2 .) at Makefile.PL line 2.<br/><br/>BEGIN failed--compilation aborted at Makefile.PL line 2.<br/><br/>not ok 1 # /usr/cmos/serverload/perl-5.18.2/t/perl Makefile.PL failed: 512<br/><br/><br/><br/>I am running this as root.<br/><br/>The ExtUtils file does exist. If I include the path to MakeMaker.pm using the -I variable it is giving me a different file that is not included in @INC.<br/><br/><br/><br/>This is what I used for configuration:<br/><br/>./Configure -Duse64bitall -A prepend libswanted=&#39;cl pthread &#39; -Ubincompat5005<br/><br/><br/><br/><br/><br/>When prompted, I changed the Optimizer mode from &#39;+O2 +Onolimit&#39; to +O1. I have tried it both ways, but am receiving the same errors.<br/><br/><br/><br/><br/><br/>Any advice would be appreciated!<br/><br/><br/>Thank You,<br/><br/><br/>Larissa<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124273.html Tue, 08 Apr 2014 02:25:08 +0000 Re: cannot install DBD::Oracle by Rui Pereira Have you tried versions 1.17 or 1.18 of DBD::Oracle?<br/><br/>Your Oracle version appears to be old, newer versions of the module don&#39;t<br/>support them.<br/><br/><br/>Best regards,<br/>Rui<br/><br/><br/>On Wed, Apr 2, 2014 at 10:02 AM, Luca Ferrari &lt;fluca1978@infinito.it&gt; wrote:<br/><br/>&gt; On Wed, Apr 2, 2014 at 9:06 AM, Zapp Prefect &lt;zapp.prefect@gmail.com&gt;<br/>&gt; wrote:<br/>&gt; &gt; That means you should Make Sure you have defined the Environment Variable<br/>&gt; &gt; $ORACLE_HOME First!<br/>&gt; &gt; Find where you installed the Oracle, and add this into your .bashrc, then<br/>&gt; &gt; relogin:<br/>&gt; &gt; export ORACLE_HOME=&quot;/path/to/Oracle&quot;<br/>&gt;<br/>&gt; Thanks, but it was clear enough that I was missing ORACLE_HOME, what<br/>&gt; is not clear to me is to what I have to refer to.<br/>&gt; Pointing it to the sql developer installation (3.2) presents me this<br/>&gt; message:<br/>&gt; [...]<br/>&gt; Oracle version 8.0.0.0 (8.0)<br/>&gt; DBD::Oracle no longer supports Oracle client versions before 9.2<br/>&gt;<br/>&gt; So what I can understand is that I&#39;m missing sqlplus, that is<br/>&gt; required. It is a shame, since I believe that the sqldeveloper should<br/>&gt; embed everything, but I admit I&#39;m not an oracle expert (and I don&#39;t<br/>&gt; aim to be).<br/>&gt;<br/>&gt; Luca<br/>&gt;<br/>&gt; --<br/>&gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt; http://learn.perl.org/<br/>&gt;<br/>&gt;<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124272.html Mon, 07 Apr 2014 22:27:17 +0000 Output of expect commands in to Strings Solved by Martin G. McCormick After further study, I probably would have had to setup<br/>a named pipe to capture expect&#39;s output in to strings which<br/>would have not bought me anything useful for this situation.<br/>We needed to know what was going on with expect as it happened,<br/>not after the fact. More study shows that there is a variable in<br/>expect&#39;s perl module called exp-&gt;before which shows you the<br/>buffer as it exists now and that is all I needed.<br/>x $exp-&gt;before outputs a scaler in which the last few lines<br/>leading up to this moment show as a long line of ASCII text in<br/>which newlinCR-LF sequences indicate line breaks in the lines<br/>originally captured. That is an easy problem to resolve for perl<br/>so my application will not have to do anything special to alert<br/>the caller that this or that went wrong. That&#39;s my favorite<br/>solution, simple and direct.<br/><br/>Martin McCormick<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124271.html Thu, 03 Apr 2014 14:48:21 +0000 NYTProf by shawn wilson For some reason, I&#39;m not getting any output from NYTProf:<br/><br/>devvm07 ~/dirt-tests # cat /tmp/prof.out<br/>cat: /tmp/prof.out: No such file or directory<br/>devvm07 ~/dirt-tests # export 2&gt;&amp;1 | egrep &#39;PERL|NYT&#39;<br/>declare -x NYTPROF=&quot;file=/tmp/prof.out&quot;<br/>declare -x PERLOPT=&quot;-d:NYTProf&quot;<br/>devvm07 ~/dirt-tests # perl -e &#39;use Devel::NYTProf v9999; print 1&#39;<br/>Devel::NYTProf version v9999.0.0 required--this is only version<br/>v5.50.0 at -e line 1.<br/>BEGIN failed--compilation aborted at -e line 1.<br/><br/>Perl is being run from within makefiles (hand written) to preform<br/>tests (not Test::More or anything that simple/clean).<br/><br/>What I&#39;d like is prof.$pid.out files like NYTProf::Apache can generate<br/>but I don&#39;t see any option to do that. But, getting some output would<br/>be a start :)<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124270.html Wed, 02 Apr 2014 14:42:44 +0000 Output of expect commands in to Strings by Martin G. McCormick When using the expect module in a perl program, one can log<br/>expect output to a file with a command like<br/><br/> $exp-&gt;log_file($somefilename);<br/><br/>You can turn off STDOUT with<br/><br/> $exp-&gt;log_stdout(0);<br/><br/> Is there a way to capture either the file output or<br/>expect&#39;s STDOUT directly in to a list?<br/> This would make the flow of the program easier to<br/>follow and control. If something goes wrong, one finds out a lot<br/>sooner.<br/>What I was thinking was is some kind of special &quot;file&quot; that<br/>writes in to @strings when you write to the file but I am open<br/>to any constructive ideas.<br/><br/>Thank you.<br/><br/>Martin McCormick<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124269.html Wed, 02 Apr 2014 13:37:11 +0000 Re: cannot install DBD::Oracle by Luca Ferrari On Wed, Apr 2, 2014 at 9:06 AM, Zapp Prefect &lt;zapp.prefect@gmail.com&gt; wrote:<br/>&gt; That means you should Make Sure you have defined the Environment Variable<br/>&gt; $ORACLE_HOME First!<br/>&gt; Find where you installed the Oracle, and add this into your .bashrc, then<br/>&gt; relogin:<br/>&gt; export ORACLE_HOME=&quot;/path/to/Oracle&quot;<br/><br/>Thanks, but it was clear enough that I was missing ORACLE_HOME, what<br/>is not clear to me is to what I have to refer to.<br/>Pointing it to the sql developer installation (3.2) presents me this message:<br/>[...]<br/>Oracle version 8.0.0.0 (8.0)<br/>DBD::Oracle no longer supports Oracle client versions before 9.2<br/><br/>So what I can understand is that I&#39;m missing sqlplus, that is<br/>required. It is a shame, since I believe that the sqldeveloper should<br/>embed everything, but I admit I&#39;m not an oracle expert (and I don&#39;t<br/>aim to be).<br/><br/>Luca<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124268.html Wed, 02 Apr 2014 09:02:47 +0000 cannot install DBD::Oracle by Luca Ferrari Hi all,<br/>I&#39;m running a linux box with the Oracle SQL Developer installed. The<br/>DBD::Oracle module refuses to install claiming it cannot find a value<br/>for ORACLE_HOME and/or an oralc einstallation. Do I need to install<br/>something else for the perl module to work or does it suffice to point<br/>ORACLE_HOME to an sql developer subtree (which?).<br/><br/>Thanks,<br/>Luca<br/> http://www.nntp.perl.org/group/perl.beginners/2014/04/msg124267.html Wed, 02 Apr 2014 06:58:06 +0000 Re: Importing subs + strict and warnings using Exporter by Octavian Rasnita From: &quot;Ruud H.G. van Tol&quot; &lt;rvtol@isolution.nl&gt;<br/><br/>&gt; On 2014-03-30 19:10, Octavian Rasnita wrote:<br/>&gt;&gt; From: &quot;Dr.Ruud&quot; &lt;rvtol+usenet@isolution.nl&gt;<br/>&gt;&gt;<br/>&gt;&gt;&gt; On 2014-03-30 12:26, Octavian Rasnita wrote:<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt;&gt; But I also want that module to export strict and warnings.<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; http://search.cpan.org/perldoc?Modern%3A%3APerl<br/>&gt;&gt;<br/>&gt;&gt; Thanks. I know about it but it is not helpful.<br/>&gt; <br/>&gt; How unimaginative you are.<br/>&gt; <br/>&gt; <br/>&gt;&gt; I want to use in my scripts just:<br/>&gt;&gt;<br/>&gt;&gt; use MyModule;<br/>&gt;&gt;<br/>&gt;&gt; #And here to have strict and warnings turned on<br/>&gt;&gt; #and to be able to call the exported subroutines:<br/>&gt;&gt; #sub1();<br/>&gt;&gt; #sub2();<br/>&gt;&gt;<br/>&gt;&gt; If I need to also add a &quot;use Modern::Perl;&quot;, then it is no helpful<br/>&gt;&gt; because I don&#39;t need Modern::Perl&#39;s aditional features and I can simply<br/>&gt;&gt; use &quot;use strict; use warnings;&quot;.<br/>&gt; <br/>&gt; So you first check out how Modern::Perl does it, and only then decide <br/>&gt; that it is too hard for you to do it in a similar way.<br/>&gt; <br/>&gt; -- <br/>&gt; Ruud<br/><br/><br/>As I&#39;ve seen, Modern::Perl exports only strict and warnings but not other subroutines, so it doesn&#39;t help because as I said, I can do that also using:<br/><br/>sub import { strict-&gt;import; warnings-&gt;import; }<br/><br/>But if I use this technique, I can&#39;t use Exporter nor Sub::Export because it gives the error &quot;import subroutine redefined&quot;.<br/><br/>I also tried to add a:<br/><br/>__PACKAGE__-&gt;import in the import subroutine above, but it does an deep recursion in import() subroutine.<br/><br/>I also tried to get the caller module and return if the caller module is the current module, so allow only first execution of import() subroutine when the caller is main, but then the subroutines from the module are not exported.<br/><br/>Octavian<br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124266.html Mon, 31 Mar 2014 09:46:05 +0000 Re: TDD and BDD with perl scripts by Sebastien Feugere &gt; Also of possible interest is Curtis &quot;Ovid&quot; Poe&#39;s<br/>&gt; https://github.com/Ovid/zen-of-test-suites (&quot;Serious testing for serious<br/>&gt; software&quot; ) which focuses on large-scale test suites.<br/><br/>+1 for any Curtis &quot;Ovid&quot; Poe things about tests. For beginners, he<br/>wrote a book &quot;Beginning Perl&quot; (for sale) with a full chapter about<br/>tests that helps me a lot when learning Perl tests.<br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124265.html Mon, 31 Mar 2014 08:08:59 +0000 Re: TDD and BDD with perl scripts by Shlomi Fish Hi Benjamin,<br/><br/>On Mon, 31 Mar 2014 11:34:26 +0700<br/>Sebastien Feugere &lt;seb.feugere@gmail.com&gt; wrote:<br/><br/>&gt; Hi,<br/>&gt; <br/>&gt; You can start here :<br/>&gt; <br/>&gt; http://modernperlbooks.com/books/modern_perl/chapter_09.html<br/>&gt; <br/>&gt; Then, you can take a look at the Test Anything Protocol (TAP) concept.<br/>&gt; After that, you can check the Test::SImple and Test::More.<br/>&gt; <br/>&gt; http://testanything.org/<br/>&gt; https://metacpan.org/pod/Test::Simple<br/>&gt; https://metacpan.org/pod/Test::More<br/>&gt; <br/><br/>In addition to Sebastien&#39;s links, you can find more information here:<br/><br/>* http://perl-begin.org/uses/qa/<br/><br/>(*Note* : perl-begin.org is a site I created and maintain.)<br/><br/>* http://cpants.cpanauthors.org/<br/><br/>One thing to note is that it is easier to test Perl modules ( &quot;.pm&quot; files) and<br/>especially those written in a CPAN-like manner than it is to test scripts.<br/>For information about those, see:<br/><br/>* http://perl-begin.org/topics/modules-and-packages/<br/><br/>* http://perl-begin.org/topics/cpan/<br/><br/>Regarding cucumber, chromatic (who wrote the book Modern Perl) criticised it<br/>here:<br/><br/>http://modernperlbooks.com/mt/2012/04/what-testing-dsls-get-wrong.html<br/><br/>I continued that with some of my own thoughts about testing here: <br/><br/>*<br/>http://blogs.perl.org/users/shlomi_fish/2013/02/essay-just-write-the-god-damn-tests-motherfucker.html<br/><br/>Also of possible interest is Curtis &ldquo;Ovid&rdquo; Poe&rsquo;s<br/>https://github.com/Ovid/zen-of-test-suites (&ldquo;Serious testing for serious<br/>software&rdquo; ) which focuses on large-scale test suites.<br/><br/>Regards,<br/><br/> Shlomi Fish <br/><br/><br/>&gt; <br/>&gt; <br/>&gt; ~$&amp;bast1<br/>&gt; <br/>&gt; <br/>&gt; On Mon, Mar 31, 2014 at 9:51 AM, Benjamin Fernandis<br/>&gt; &lt;benjo11111@gmail.com&gt; wrote:<br/>&gt; &gt; Hi,<br/>&gt; &gt;<br/>&gt; &gt; I am new with perl and using it for my sys admin jobs. I want to use TDD /<br/>&gt; &gt; BDD with my perl scripts to make it more robust.<br/>&gt; &gt;<br/>&gt; &gt; Can you please suggest me that how to integrate TDD/BDD with perl scripts.?<br/>&gt; &gt;<br/>&gt; &gt; In my company , developer uses rspec and cucumber with ruby based code.<br/>&gt; &gt;<br/>&gt; &gt; I am from sys admin background. Suggest me something simple and easiest way<br/>&gt; &gt; to catch it.<br/>&gt; &gt;<br/>&gt; &gt; Regards<br/>&gt; &gt; Ben<br/>&gt; <br/><br/><br/><br/>-- <br/>-----------------------------------------------------------------<br/>Shlomi Fish http://www.shlomifish.org/<br/>Why I Love Perl - http://shlom.in/joy-of-perl<br/><br/>Your next job after one in @NSACareers, will be as a dead corpse in a coffin,<br/>6 feet underground, or as a patient in a psychiatric ward.<br/> &mdash; http://www.shlomifish.org/humour/bits/facts/NSA<br/><br/>Please reply to list if it&#39;s a mailing list post - http://shlom.in/reply .<br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124264.html Mon, 31 Mar 2014 07:21:52 +0000 Re: TDD and BDD with perl scripts by Sebastien Feugere Hi,<br/><br/>You can start here :<br/><br/> http://modernperlbooks.com/books/modern_perl/chapter_09.html<br/><br/>Then, you can take a look at the Test Anything Protocol (TAP) concept.<br/>After that, you can check the Test::SImple and Test::More.<br/><br/> http://testanything.org/<br/> https://metacpan.org/pod/Test::Simple<br/> https://metacpan.org/pod/Test::More<br/><br/><br/><br/>~$&amp;bast1<br/><br/><br/>On Mon, Mar 31, 2014 at 9:51 AM, Benjamin Fernandis<br/>&lt;benjo11111@gmail.com&gt; wrote:<br/>&gt; Hi,<br/>&gt;<br/>&gt; I am new with perl and using it for my sys admin jobs. I want to use TDD /<br/>&gt; BDD with my perl scripts to make it more robust.<br/>&gt;<br/>&gt; Can you please suggest me that how to integrate TDD/BDD with perl scripts.?<br/>&gt;<br/>&gt; In my company , developer uses rspec and cucumber with ruby based code.<br/>&gt;<br/>&gt; I am from sys admin background. Suggest me something simple and easiest way<br/>&gt; to catch it.<br/>&gt;<br/>&gt; Regards<br/>&gt; Ben<br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124263.html Mon, 31 Mar 2014 04:35:12 +0000 Re: Importing subs + strict and warnings using Exporter by Ruud H.G. van Tol On 2014-03-30 19:10, Octavian Rasnita wrote:<br/>&gt; From: &quot;Dr.Ruud&quot; &lt;rvtol+usenet@isolution.nl&gt;<br/>&gt;<br/>&gt;&gt; On 2014-03-30 12:26, Octavian Rasnita wrote:<br/>&gt;&gt;<br/>&gt;&gt;&gt; But I also want that module to export strict and warnings.<br/>&gt;&gt;<br/>&gt;&gt; http://search.cpan.org/perldoc?Modern%3A%3APerl<br/>&gt;<br/>&gt; Thanks. I know about it but it is not helpful.<br/><br/>How unimaginative you are.<br/><br/><br/>&gt; I want to use in my scripts just:<br/>&gt;<br/>&gt; use MyModule;<br/>&gt;<br/>&gt; #And here to have strict and warnings turned on<br/>&gt; #and to be able to call the exported subroutines:<br/>&gt; #sub1();<br/>&gt; #sub2();<br/>&gt;<br/>&gt; If I need to also add a &quot;use Modern::Perl;&quot;, then it is no helpful<br/>&gt; because I don&#39;t need Modern::Perl&#39;s aditional features and I can simply<br/>&gt; use &quot;use strict; use warnings;&quot;.<br/><br/>So you first check out how Modern::Perl does it, and only then decide <br/>that it is too hard for you to do it in a similar way.<br/><br/>-- <br/>Ruud<br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124262.html Mon, 31 Mar 2014 04:32:14 +0000 TDD and BDD with perl scripts by Benjamin Fernandis Hi,<br/><br/>I am new with perl and using it for my sys admin jobs. I want to use TDD /<br/>BDD with my perl scripts to make it more robust.<br/><br/>Can you please suggest me that how to integrate TDD/BDD with perl scripts.?<br/><br/>In my company , developer uses rspec and cucumber with ruby based code.<br/><br/>I am from sys admin background. Suggest me something simple and easiest way<br/>to catch it.<br/><br/>Regards<br/>Ben<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124261.html Mon, 31 Mar 2014 02:51:16 +0000 Re: Importing subs + strict and warnings using Exporter by Octavian Rasnita From: &quot;Dr.Ruud&quot; &lt;rvtol+usenet@isolution.nl&gt;<br/><br/>&gt; On 2014-03-30 12:26, Octavian Rasnita wrote:<br/>&gt;<br/>&gt;&gt; But I also want that module to export strict and warnings.<br/>&gt;<br/>&gt; http://search.cpan.org/perldoc?Modern%3A%3APerl<br/>&gt;<br/>&gt; -- <br/>&gt; Ruud<br/><br/><br/>Thanks. I know about it but it is not helpful.<br/><br/><br/>I want to use in my scripts just:<br/><br/>use MyModule;<br/><br/>#And here to have strict and warnings turned on<br/>#and to be able to call the exported subroutines:<br/>#sub1();<br/>#sub2();<br/><br/>If I need to also add a &quot;use Modern::Perl;&quot;, then it is no helpful because I <br/>don&#39;t need Modern::Perl&#39;s aditional features and I can simply use &quot;use <br/>strict; use warnings;&quot;.<br/><br/>Octavian<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124260.html Sun, 30 Mar 2014 17:11:14 +0000 Re: Importing subs + strict and warnings using Exporter by Dr.Ruud On 2014-03-30 12:26, Octavian Rasnita wrote:<br/><br/>&gt; But I also want that module to export strict and warnings.<br/><br/>http://search.cpan.org/perldoc?Modern%3A%3APerl<br/><br/>-- <br/>Ruud<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124259.html Sun, 30 Mar 2014 10:44:22 +0000 Importing subs + strict and warnings using Exporter by Octavian Rasnita Hello,<br/><br/>I am trying to create a module that exports a few subroutines in the script <br/>that uses it.<br/>This is OK, very simple to do using Exporter.<br/><br/>But I also want that module to export strict and warnings.<br/><br/>If I don&#39;t use Exporter in the module, I can make it to export strict and <br/>warnings, using something like:<br/><br/>sub import { strict-&gt;import; warnings-&gt;import; }<br/><br/>This way I don&#39;t need to write use strict; use warnings; in the scripts that <br/>uses this module.<br/><br/>But if in that module I use both Exporter and<br/>sub import { strict-&gt;import; warnings-&gt;import; }<br/>than the exporter doesn&#39;t export the subroutines I specified in @EXPORT <br/>array.<br/><br/>Do you know if there is a way of exporting both strict and warnings feature <br/>and also export some subroutines?<br/><br/>Thanks.<br/><br/>--Octavian<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124258.html Sun, 30 Mar 2014 10:27:09 +0000 Re: Brand New by Maurice McCarthy I think I concatenated the to to http ! and that is why the 404 error.<br/>Thanks for the info.<br/><br/><br/>Maurice<br/><br/><br/>On Tue, Mar 25, 2014 at 06:26:46AM -0500 or thereabouts, Mike Flannigan wrote:<br/>&gt; <br/>&gt; Howdy,<br/>&gt; <br/>&gt; I get a 404 Not Found when I go to that link.<br/>&gt; <br/>&gt; You can use Perl as a browser, but it&#39;s not<br/>&gt; beginner material and Perl generally does not<br/>&gt; do simple browsing as well as a browser.<br/>&gt; <br/>&gt; When you see &quot;This site requires Javascript&quot;, click<br/>&gt; on &quot;options&quot; in the lower right, go to the bottom<br/>&gt; of the list, and select &quot;Temporarily allow&quot; . . .<br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; Mike<br/>&gt; <br/>&gt; <br/>&gt; On 3/23/2014 9:45 PM, beginners-digest-help@perl.org wrote:<br/>&gt; &gt;Hi,<br/>&gt; &gt;<br/>&gt; &gt;I&#39;m brand new to Perl. I&#39;m reading perldoc and working through Simon <br/>&gt; &gt;Cozens online<br/>&gt; &gt;book to get me started. Even though it is 14 years old and some syntax has <br/>&gt; &gt;changed<br/>&gt; &gt;in the meantime, figuring out how to make the operations work is getting <br/>&gt; &gt;me into<br/>&gt; &gt;perl.<br/>&gt; &gt;<br/>&gt; &gt;At present I&#39;ve got Strawberry Perl 5.18.2 on Windows 7. I run UNIX-type <br/>&gt; &gt;systems at<br/>&gt; &gt;home but I&#39;m at sea and so got use what I got here.<br/>&gt; &gt;<br/>&gt; &gt;One thing puzzles me at the moment. I run Firefox Portable with NoScript <br/>&gt; &gt;installed.<br/>&gt; &gt;When I go tohttp://perldoc.perl.org/search there is a message, &quot;This site <br/>&gt; &gt;requires<br/>&gt; &gt;Javascript ... &quot; Why can&#39;t you use Perl instead?<br/>&gt; &gt;<br/>&gt; &gt;Just Curious<br/>&gt; &gt;Thanks<br/>&gt; &gt;Moss<br/>&gt; &gt;<br/>&gt; &gt;<br/>&gt; <br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124257.html Sun, 30 Mar 2014 09:08:27 +0000 Re: use sys::virt module to manage VM in kvm by Dr.Ruud On 2014-03-28 21:56, Andy Bach wrote:<br/>&gt;<br/>&gt; On Fri, Mar 28, 2014 at 3:05 PM, Dr.Ruud &lt;rvtol+usenet@isolution.nl<br/>&gt; &lt;mailto:rvtol+usenet@isolution.nl&gt;&gt; wrote:<br/>&gt;<br/>&gt; if ($@) {<br/>&gt; die &quot;$@&quot;;<br/>&gt; }<br/>&gt;<br/>&gt;<br/>&gt; Never test $@, only use the value of $@ after a failed eval.<br/>&gt;<br/>&gt;<br/>&gt; Why not?<br/><br/>Because $@ is a global variable, which can (AKA will) get changed <br/>between the failure and your test.<br/><br/>So the answer is: Why gamble if you don&#39;t need to?<br/><br/><br/> my $obj;<br/> eval {<br/> $obj = get_obj();<br/> 1; # success<br/> }<br/> or do {<br/> my $eval_error = $@ || &quot;Zombie Error&quot;;<br/> warn &quot;WARNING: &quot;, $eval_error;<br/> ...;<br/> };<br/><br/><br/>Recent Perls localize $@ more, so the odds of getting into trouble with <br/>code that is testing $@, have become smaller over the years. Which is <br/>good because there is plenty of code around that still does it.<br/><br/>-- <br/>Ruud<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124256.html Sat, 29 Mar 2014 09:03:34 +0000 Re: use sys::virt module to manage VM in kvm by Andy Bach On Fri, Mar 28, 2014 at 3:05 PM, Dr.Ruud &lt;rvtol+usenet@isolution.nl&gt; wrote:<br/><br/>&gt; if ($@) {<br/>&gt;&gt; die &quot;$@&quot;;<br/>&gt;&gt; }<br/>&gt;&gt;<br/>&gt;<br/>&gt; Never test $@, only use the value of $@ after a failed eval.<br/>&gt;<br/><br/>Why not? The perldoc eval shows:<br/>If the code to be executed doesn&#39;t vary, you may use the eval-BLOCK form to<br/>trap<br/> run-time errors without incurring the penalty of recompiling<br/>each time. The error,<br/> if any, is still returned in $@. Examples:<br/><br/> # make divide-by-zero nonfatal<br/> eval { $answer = $a / $b; }; warn $@ if $@;<br/><br/> # same thing, but less efficient<br/> eval &#39;$answer = $a / $b&#39;; warn $@ if $@;<br/><br/> # a compile-time error<br/> eval { $answer = }; # WRONG<br/><br/> # a run-time error<br/> eval &#39;$answer =&#39;; # sets $@<br/><br/><br/><br/>-- <br/><br/>a<br/><br/>Andy Bach,<br/>afbach@gmail.com<br/>608 658-1890 cell<br/>608 261-5738 wk<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124255.html Fri, 28 Mar 2014 20:56:29 +0000 Re: Log4Perl query by Andy Bach On Fri, Mar 28, 2014 at 8:01 AM, punit jain &lt;contactpunitjain@gmail.com&gt;wrote:<br/><br/>&gt; Attempt to bless into a reference at<br/>&gt; /root/scripts/bin/../lib/Log/Log4perl/Logger.pm line 143.<br/>&gt;<br/><br/>Not really but:<br/> Why &quot;Log::Log4perl-&gt;get_logger&quot; and not &quot;Log::Log4perl-&gt;new&quot;? We don&#39;t<br/>want to create a new<br/> object every time. Usually in OO-Programming, you create an object<br/>once and use the<br/> reference to it to call its methods. However, this requires that you<br/>pass around the object<br/> to all functions and the last thing we want is pollute each and<br/>every function/method we&#39;re<br/> using with a handle to the &quot;Logger&quot;:<br/><br/> sub function { # Brrrr!!<br/> my($logger, $some, $other, $parameters) = @_;<br/> }<br/><br/> Instead, if a function/method wants a reference to the logger, it<br/>just calls the Logger&#39;s<br/> static &quot;get_logger($category)&quot; method to obtain a reference to the<br/>one and only possible<br/> logger object of a certain category. That&#39;s called a singleton if<br/>you&#39;re a Gamma fan.<br/><br/><br/><br/>and so:<br/>#$logger-&gt;get_logger(&#39;LOG2&#39;);<br/>$logger = Log::Log4perl-&gt;get_logger(&#39;LOG2&#39;);<br/><br/>seems to work.<br/><br/><br/><br/>-- <br/><br/>a<br/><br/>Andy Bach,<br/>afbach@gmail.com<br/>608 658-1890 cell<br/>608 261-5738 wk<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124254.html Fri, 28 Mar 2014 20:17:44 +0000 Re: use sys::virt module to manage VM in kvm by Dr.Ruud On 2014-03-27 20:53, Natxo Asenjo wrote:<br/><br/>&gt; use strict;<br/>&gt; use warnings;<br/>&gt; use utf8;<br/><br/>That &quot;use utf8;&quot; is almost always wrong, see &#39;perldoc utf8&#39;, only use it <br/>if your source code is utf8 encoded.<br/><br/><br/>&gt; if ($@) {<br/>&gt; die &quot;$@&quot;;<br/>&gt; }<br/><br/>Never test $@, only use the value of $@ after a failed eval.<br/><br/>-- <br/>Ruud<br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124253.html Fri, 28 Mar 2014 20:06:07 +0000 Re: use sys::virt module to manage VM in kvm by lesleyb On Thu, Mar 27, 2014 at 01:41:53PM -0400, PJ wrote:<br/>&gt; I&rsquo;m new to perl too&hellip;but do they have a concept of abstract classes in perl?<br/>&gt; On Mar 27, 2014, at 3:27 AM, lesleyb &lt;lesleyb@herlug.org.uk&gt; wrote:<br/>&gt; <br/>&gt; &gt; On Wed, Mar 26, 2014 at 06:43:47PM -0700, Jim Gibson wrote:<br/>&gt; &gt;&gt; <br/>&gt; &gt;&gt; On Mar 26, 2014, at 6:30 PM, Benjamin Fernandis &lt;benjo11111@gmail.com&gt; wrote:<br/>&gt; &gt;&gt; <br/>&lt;snip&gt;<br/>&gt; &gt;&gt;&gt; Can&#39;t locate object method &quot;destroy&quot; via package &quot;Sys::Virt&quot; at vm.pl line 18.<br/>&gt; &gt; This error message means what it says ;-) <br/>&gt; &gt; A Perl module is a definition of a class; when you declared $vmm initially you<br/>&gt; &gt; instantiated an object of the class Sys::Virt.<br/>&gt; &gt; The class Sys::Virt does not have a method declared in it called destroy. <br/>&gt; &gt; Therefore your object cannot have a method called destroy.<br/>&gt; &gt; You can use the command &#39;perldoc Sys::Virt&#39; to look at the documentation for<br/>&gt; &gt; this class or look at it on line via<br/>&gt; &gt; http://search.cpan.org/~danberr/Sys-Virt-1.2.2/lib/Sys/Virt.pm<br/><br/>I&#39;m so awfully tempted to say this : <br/>&#39;you can write a class that doesn&#39;t implement any methods it declares pretty<br/>well in any language that has OO capability&#39; <br/>- see I couldn&#39;t resist. But that&#39;s just tongue in cheek and not very helpful.<br/><br/>Abstract classes, say in Java, use an abstract keyword to denote the class is<br/>abstract and as such may contain methods that don&#39;t implement anything but the<br/>abstractness of the class is also that it is only ever inheritable and never<br/>instantiated as an object.<br/><br/>Java is a heavily typed languaged. Perl is not. So I don&#39;t think there is a<br/>formal abstract class available in Perl.<br/><br/>There is an interesting discussion on abstract classes and Moose here :<br/>http://www.perlmonks.org/?node_id=812418<br/>and this page on CPAN discusses Moose Roles with an indication of being able to<br/>create something like a Java interface <br/>http://search.cpan.org/~ether/Moose-2.1204/lib/Moose/Manual/Roles.pod<br/>but where all the methods of the Role have to be implemented in the consuming<br/>class.<br/><br/>FWIW: Moose is the way to go these days on Perl OO. See <br/>http://search.cpan.org/~ether/Moose-2.1204/lib/Moose.pm<br/><br/>If/when/once you have Moose installed `perldoc` Moose will be your friend.<br/><br/>Ciao<br/><br/>Lesley<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124252.html Fri, 28 Mar 2014 19:48:58 +0000 Log4Perl query by punit jain Hi,<br/><br/>I have a requirement where I need different appenders writing to same log<br/>file for different layout patterns.<br/><br/>Below is my log4Perl config file :-<br/><br/>log4perl.logger.timestamp = INFO, LOG1<br/>log4perl.appender.LOG1 = Log::Log4perl::Appender::File<br/>log4perl.appender.LOG1.filename = /tmp/status<br/>log4perl.appender.LOG1.mode = append<br/>log4perl.appender.LOG1.layout = Log::Log4perl::Layout::PatternLayout<br/>log4perl.appender.LOG1.layout.ConversionPattern =* %d %p %m%n*<br/><br/># second logger points to the same file but with different level<br/>log4perl.logger.message = INFO, LOG2<br/>log4perl.appender.LOG2 = Log::Log4perl::Appender::File<br/>log4perl.appender.LOG2.filename = /tmp/status<br/>log4perl.appender.LOG2.mode = append<br/>log4perl.appender.LOG2.layout = Log::Log4perl::Layout::PatternLayout<br/>log4perl.appender.LOG2.layout.ConversionPattern = *%m%n*<br/><br/>My code uses them like below :-<br/><br/>*my $logger = Log::Log4perl-&gt;get_logger(&#39;LOG1&#39;);*<br/>$logger-&gt;info(&quot;CPU DETAILS&quot;);<br/>$logger-&gt;info(&quot;===============&quot;);<br/>$logger-&gt;info(&quot;Number of cores for the system are: $num_cores&quot;);<br/>$logger-&gt;info(&quot;Operating System is $os&quot;);<br/><br/>*$logger-&gt;get_logger(&#39;LOG2&#39;);*<br/>my @cpuresult = `/usr/bin/sar -q`;<br/>$logger-&gt;info(&quot;@cpuresult&quot;);<br/><br/>However when I execute the code I get error :-<br/><br/><br/>Attempt to bless into a reference at<br/>/root/scripts/bin/../lib/Log/Log4perl/Logger.pm line 143.<br/><br/>Any clues ?<br/><br/>Regards,<br/>Punit<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124251.html Fri, 28 Mar 2014 13:02:01 +0000 padding values depending on a list by Luca Ferrari Hi all,<br/>I&#39;ve a problem that has to presents data into an array in a set of<br/>string with a variable left/right padding depending on the field<br/>position in the arrat. Therefore I&#39;m building a very long printf<br/>format string to be used as:<br/><br/>print &lt;fmt-string&gt; @array;<br/><br/>What I don&#39;t like in this solution is that the fmt-string becomes<br/>quickly not easy to read and understand, and therefore maintain. I&#39;m<br/>sure there should be a better approach, like for instance using a<br/>configuration array that can specify each field how has to be<br/>formatted and padded, and then combine the two arrays into a single<br/>string.<br/><br/>But how? Suggestions?<br/><br/>Thanks,<br/>Luca<br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124250.html Fri, 28 Mar 2014 12:15:36 +0000 Re: use sys::virt module to manage VM in kvm by Natxo Asenjo --<br/>Groeten,<br/>natxo<br/><br/><br/>On Thu, Mar 27, 2014 at 2:30 AM, Benjamin Fernandis &lt;benjo11111@gmail.com&gt;wrote:<br/><br/>&gt; Hi,<br/>&gt;<br/>&gt; I am new with perl and we have virtual machines in our infra. i want to<br/>&gt; use perl sys::virt module to manage them, means to shutdown / start vm by<br/>&gt; script and for that i wrote below small code.<br/>&gt;<br/>&gt; #!/usr/bin/perl<br/>&gt; #<br/>&gt; use strict;<br/>&gt; use warnings;<br/>&gt;<br/>&gt; use Sys::Virt;<br/>&gt;<br/>&gt;<br/>&gt; my $vmm = Sys::Virt-&gt;new(uri =&gt; &quot;qemu:///system&quot;);<br/>&gt;<br/>&gt; my @domains = $vmm-&gt;list_domains();<br/>&gt;<br/>&gt; foreach my $dom (@domains) {<br/>&gt; print &quot;Domain &quot;, $dom-&gt;get_id, &quot; &quot;, $dom-&gt;get_name, &quot;\n&quot;;<br/>&gt; }<br/>&gt; my $vm = &#39;win7&#39;;<br/>&gt;<br/>&gt; $vm = $vmm-&gt;destroy();<br/>&gt;<br/>&gt;<br/>calling destroy will pull off the plug. Do not do that ;-) unless you want<br/>to break things in your vm.<br/><br/>This works (just tested it now on a fedora 20 system):<br/><br/>use strict;<br/>use warnings;<br/>use utf8;<br/><br/>use Sys::Virt;<br/>my $uri = &quot;qemu:///system&quot;;<br/><br/>my $con = Sys::Virt-&gt;new(<br/> uri =&gt; $uri,<br/>);<br/><br/>if ($@) {<br/> die &quot;$@&quot;;<br/>}<br/><br/>for my $dom ( $con-&gt;list_domains, $con-&gt;list_defined_domains) {<br/> print &quot;name: &quot;, $dom-&gt;get_name, &quot;\n&quot;;<br/> print &quot;uuid: &quot;, $dom-&gt;get_uuid_string(), &quot;\n&quot;;<br/><br/> print $dom-&gt;get_info-&gt;{state}, &quot;\n&quot;;<br/><br/> if ($dom-&gt;get_info-&gt;{state} == Sys::Virt::Domain::STATE_RUNNING) {<br/> $dom-&gt;shutdown();<br/> print $dom-&gt;get_name, &quot; going doing!\n&quot;;<br/> }<br/> if ($dom-&gt;get_info-&gt;{state} == Sys::Virt::Domain::STATE_SHUTOFF) {<br/> $dom-&gt;create();<br/> print $dom-&gt;get_name, &quot; starting up!\n&quot;;<br/> }<br/>}<br/><br/>--<br/>regards,<br/>natxo<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124249.html Thu, 27 Mar 2014 19:53:56 +0000 Re: use sys::virt module to manage VM in kvm by PJ I&rsquo;m new to perl too&hellip;but do they have a concept of abstract classes in perl?<br/>On Mar 27, 2014, at 3:27 AM, lesleyb &lt;lesleyb@herlug.org.uk&gt; wrote:<br/><br/>&gt; On Wed, Mar 26, 2014 at 06:43:47PM -0700, Jim Gibson wrote:<br/>&gt;&gt; <br/>&gt;&gt; On Mar 26, 2014, at 6:30 PM, Benjamin Fernandis &lt;benjo11111@gmail.com&gt; wrote:<br/>&gt;&gt; <br/>&gt;&gt;&gt; Hi,<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; I am new with perl and we have virtual machines in our infra. i want to use perl sys::virt module to manage them, means to shutdown / start vm by script and for that i wrote below small code.<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; #!/usr/bin/perl<br/>&gt;&gt;&gt; #<br/>&gt;&gt;&gt; use strict;<br/>&gt;&gt;&gt; use warnings;<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; use Sys::Virt;<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; my $vmm = Sys::Virt-&gt;new(uri =&gt; &quot;qemu:///system&quot;);<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; my @domains = $vmm-&gt;list_domains();<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; foreach my $dom (@domains) {<br/>&gt;&gt;&gt; print &quot;Domain &quot;, $dom-&gt;get_id, &quot; &quot;, $dom-&gt;get_name, &quot;\n&quot;;<br/>&gt;&gt;&gt; }<br/>&gt;&gt;&gt; my $vm = &#39;win7&#39;;<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; $vm = $vmm-&gt;destroy();<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; and when i run it , i got below error.<br/>&gt;&gt;&gt; <br/>&gt;&gt;&gt; Domain 10 win7<br/>&gt;&gt;&gt; Can&#39;t locate object method &quot;destroy&quot; via package &quot;Sys::Virt&quot; at vm.pl line 18.<br/>&gt; This error message means what it says ;-) <br/>&gt; A Perl module is a definition of a class; when you declared $vmm initially you<br/>&gt; instantiated an object of the class Sys::Virt.<br/>&gt; The class Sys::Virt does not have a method declared in it called destroy. <br/>&gt; Therefore your object cannot have a method called destroy.<br/>&gt; You can use the command &#39;perldoc Sys::Virt&#39; to look at the documentation for<br/>&gt; this class or look at it on line via<br/>&gt; http://search.cpan.org/~danberr/Sys-Virt-1.2.2/lib/Sys/Virt.pm<br/>&gt; <br/>&gt; <br/>&gt; What are you expecting the destroy method to do?<br/>&gt; <br/>&gt; Kind regards<br/>&gt; <br/>&gt; Lesley<br/>&gt; <br/>&gt; -- <br/>&gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt; http://learn.perl.org/<br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124248.html Thu, 27 Mar 2014 17:42:04 +0000 Re: use sys::virt module to manage VM in kvm by Steve Kaftanski Perhaps<br/>http://search.cpan.org/~danberr/Sys-Virt-1.2.2/lib/Sys/Virt/Network.pm is<br/>where you will get this function:<br/>...<br/>$net-&gt;destroy()<br/> Immediately terminate the machine, and remove it from the virtual machine<br/>monitor. The $net handle is invalid after this call completes and should<br/>not be used again.<br/><br/>So, I cannot tell you how to use this exactly (since I didn&#39;t know about<br/>this until a few minutes ago), but I assure you we will be investigating<br/>this ourselves now; thanks! -Steve K.<br/><br/><br/><br/>On Thu, Mar 27, 2014 at 2:27 AM, lesleyb &lt;lesleyb@herlug.org.uk&gt; wrote:<br/><br/>&gt; On Wed, Mar 26, 2014 at 06:43:47PM -0700, Jim Gibson wrote:<br/>&gt; &gt;<br/>&gt; &gt; On Mar 26, 2014, at 6:30 PM, Benjamin Fernandis &lt;benjo11111@gmail.com&gt;<br/>&gt; wrote:<br/>&gt; &gt;<br/>&gt; &gt; &gt; Hi,<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; I am new with perl and we have virtual machines in our infra. i want<br/>&gt; to use perl sys::virt module to manage them, means to shutdown / start vm<br/>&gt; by script and for that i wrote below small code.<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; #!/usr/bin/perl<br/>&gt; &gt; &gt; #<br/>&gt; &gt; &gt; use strict;<br/>&gt; &gt; &gt; use warnings;<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; use Sys::Virt;<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; my $vmm = Sys::Virt-&gt;new(uri =&gt; &quot;qemu:///system&quot;);<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; my @domains = $vmm-&gt;list_domains();<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; foreach my $dom (@domains) {<br/>&gt; &gt; &gt; print &quot;Domain &quot;, $dom-&gt;get_id, &quot; &quot;, $dom-&gt;get_name, &quot;\n&quot;;<br/>&gt; &gt; &gt; }<br/>&gt; &gt; &gt; my $vm = &#39;win7&#39;;<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; $vm = $vmm-&gt;destroy();<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; and when i run it , i got below error.<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; Domain 10 win7<br/>&gt; &gt; &gt; Can&#39;t locate object method &quot;destroy&quot; via package &quot;Sys::Virt&quot; at vm.plline 18.<br/>&gt; This error message means what it says ;-)<br/>&gt; A Perl module is a definition of a class; when you declared $vmm initially<br/>&gt; you<br/>&gt; instantiated an object of the class Sys::Virt.<br/>&gt; The class Sys::Virt does not have a method declared in it called destroy.<br/>&gt; Therefore your object cannot have a method called destroy.<br/>&gt; You can use the command &#39;perldoc Sys::Virt&#39; to look at the documentation<br/>&gt; for<br/>&gt; this class or look at it on line via<br/>&gt; http://search.cpan.org/~danberr/Sys-Virt-1.2.2/lib/Sys/Virt.pm<br/>&gt;<br/>&gt;<br/>&gt; What are you expecting the destroy method to do?<br/>&gt;<br/>&gt; Kind regards<br/>&gt;<br/>&gt; Lesley<br/>&gt;<br/>&gt; --<br/>&gt; To unsubscribe, e-mail: beginners-unsubscribe@perl.org<br/>&gt; For additional commands, e-mail: beginners-help@perl.org<br/>&gt; http://learn.perl.org/<br/>&gt;<br/>&gt;<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124247.html Thu, 27 Mar 2014 17:35:19 +0000 Re: Perl event programming book by shawn wilson No &quot;books&quot; per se. And this thread is pretty old. However, some of the<br/>links still work and you should be able to find the rest by googling<br/>the titles.<br/>http://www.perlmonks.org/?node_id=281219<br/><br/>On Thu, Mar 27, 2014 at 10:33 AM, Yonghua Peng &lt;sysops@mail2000.us&gt; wrote:<br/>&gt;<br/>&gt; Hello,<br/>&gt;<br/>&gt; Is there a book avaiable for Perl event driven programming?<br/>&gt; I tried searching but got no luck. Thanks.<br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124246.html Thu, 27 Mar 2014 14:41:27 +0000 Perl event programming book by Yonghua Peng <br/>Hello,<br/><br/>Is there a book avaiable for Perl event driven programming?<br/>I tried searching but got no luck. Thanks.<br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124245.html Thu, 27 Mar 2014 14:33:40 +0000 Re: use sys::virt module to manage VM in kvm by 'lesleyb' On Wed, Mar 26, 2014 at 06:43:47PM -0700, Jim Gibson wrote:<br/>&gt; <br/>&gt; On Mar 26, 2014, at 6:30 PM, Benjamin Fernandis &lt;benjo11111@gmail.com&gt; wrote:<br/>&gt; <br/>&gt; &gt; Hi,<br/>&gt; &gt; <br/>&gt; &gt; I am new with perl and we have virtual machines in our infra. i want to use perl sys::virt module to manage them, means to shutdown / start vm by script and for that i wrote below small code.<br/>&gt; &gt; <br/>&gt; &gt; #!/usr/bin/perl<br/>&gt; &gt; #<br/>&gt; &gt; use strict;<br/>&gt; &gt; use warnings;<br/>&gt; &gt; <br/>&gt; &gt; use Sys::Virt;<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; my $vmm = Sys::Virt-&gt;new(uri =&gt; &quot;qemu:///system&quot;);<br/>&gt; &gt; <br/>&gt; &gt; my @domains = $vmm-&gt;list_domains();<br/>&gt; &gt; <br/>&gt; &gt; foreach my $dom (@domains) {<br/>&gt; &gt; print &quot;Domain &quot;, $dom-&gt;get_id, &quot; &quot;, $dom-&gt;get_name, &quot;\n&quot;;<br/>&gt; &gt; }<br/>&gt; &gt; my $vm = &#39;win7&#39;;<br/>&gt; &gt; <br/>&gt; &gt; $vm = $vmm-&gt;destroy();<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; and when i run it , i got below error.<br/>&gt; &gt; <br/>&gt; &gt; Domain 10 win7<br/>&gt; &gt; Can&#39;t locate object method &quot;destroy&quot; via package &quot;Sys::Virt&quot; at vm.pl line 18.<br/>This error message means what it says ;-) <br/>A Perl module is a definition of a class; when you declared $vmm initially you<br/>instantiated an object of the class Sys::Virt.<br/>The class Sys::Virt does not have a method declared in it called destroy. <br/>Therefore your object cannot have a method called destroy.<br/>You can use the command &#39;perldoc Sys::Virt&#39; to look at the documentation for<br/>this class or look at it on line via<br/>http://search.cpan.org/~danberr/Sys-Virt-1.2.2/lib/Sys/Virt.pm<br/><br/><br/>What are you expecting the destroy method to do?<br/><br/>Kind regards<br/><br/>Lesley<br/> http://www.nntp.perl.org/group/perl.beginners/2014/03/msg124244.html Thu, 27 Mar 2014 07:27:11 +0000