perl.beginners http://www.nntp.perl.org/group/perl.beginners/ ... Copyright 1998-2014 perl.org Mon, 28 Jul 2014 22:27:51 +0000 ask@perl.org Useful Constructs (was About staying brushed up on perl) by Martin G. McCormick One thing I just started working with is the anonymous<br/>subroutine as in<br/><br/>$stringmuncher = sub {<br/>....<br/>};<br/> It lets one execute the same code multiple times from<br/>other code in the same scope without having to define and then<br/>pass values to lots of different variables. As long as one<br/>understands the risk, it is a nice feature.<br/><br/>Martin McCormick<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124652.html Mon, 28 Jul 2014 16:56:47 +0000 Re: About staying brushed up on perl by Martin G. McCormick mimosinnet@gmail.com writes:<br/>&gt; I have self-learned Perl about a couple of years ago and I am also having <br/>&gt; a<br/>&gt; similar use of Perl, so I often forget how I did things. I must also say<br/>&gt; that I am about to be 50 years old next December and I do not have any<br/>&gt; technical education as my degree is in psychology. I use<br/>&gt; http://perlweekly.com/ to see what is going on, http://perlmaven.com/ to<br/>&gt; remember how things are done and O&#39;Reilly if I need more in-depth<br/>&gt; understanding on a specific issue. Cheers!<br/><br/> Well, I&#39;ll be 63 in about 3 weeks so I am in the middle,<br/>here. I got in to information technology by accident in 1979 and<br/>just after the introduction to BASIC which, by the way, was<br/>invented by a president of Harvard to make computing a bit less<br/>intimidating, I didn&#39;t like something that an Apple II was doing<br/>and complained about it to a coworker who introduced me to 6502<br/>assembly language. Be careful about complaining or you may find<br/>yourself appointed camp cook.<br/> Actually, I loved the challenge but it comes down to the<br/>point to find something you are personally interested in fixing,<br/>solving, etc and then seeing what software tool best does the<br/>job.<br/> I don&#39;t come from a computer science background but I<br/>love making stuff work. It sounds like both of you are really<br/>doing things the right way in that you will retain what you<br/>learn forever if it is relevant and forget it 6 months later if<br/>it is just theory without practice.<br/> Good luck and may your perl programs work even with<br/>warnings and strict turned on.<br/><br/>Martin McCormick<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124651.html Sat, 26 Jul 2014 13:43:26 +0000 Re: About staying brushed up on perl by Alex Mestiashvili On 07/19/2014 11:33 PM, Harry Putnam wrote:<br/>&gt; First my usage:<br/>&gt; Single user machines, home lan and basic networking.<br/>&gt; My specific perl usage is as often just something I want to do as it<br/>&gt; is some system oriented scripting.<br/>&gt; ------- ------- ---=--- ------- -------<br/>&gt;<br/>&gt; I&#39;ve been a perl user for several yrs, but never really stay<br/>&gt; programming steadily or even semi-steadily for very long at a time. A<br/>&gt; month would be a long time historically for me. And would likely be<br/>&gt; followed by many months or even a year or more of no perl activity.<br/>&gt;<br/>&gt; Consequently, all the cool little tricks one kind of stumbles on or<br/>&gt; more importantly, the piles of things learned on this list over years<br/>&gt; of following and using it seem to evaporate between engagements.<br/>&gt;<br/>&gt; I find myself having to ask about things I know I&#39;ve learned before.<br/>&gt; And even things I&#39;ve made notes about... I often find I&#39;ve forgotten<br/>&gt; enough that my notes don&#39;t make any sense to me any more.<br/>&gt;<br/>&gt; OK, OK, so maybe I&#39;m a little dimmer or down right thick skulled<br/>&gt; compared to most. Or even suffering from early onset senility... (I am<br/>&gt; 70 next March after all.. and it would be a nice face saving<br/>&gt; excuse...).<br/>&gt;<br/>&gt; BUT: is there some remedy in the way of keeping brushed up by weekly<br/>&gt; perl work or the like?<br/>&gt;<br/>&gt; I mean an organized sort of structured kind of setup where you are<br/>&gt; expected to program something to a spec determined by someone<br/>&gt; knowledgeable.<br/>&gt;<br/>&gt; Err... I guess I&#39;m describing a perl class, but in my case it would<br/>&gt; have been the longest running `class&#39; in recorded history... by now<br/>&gt; some 15 to 20 yrs.<br/>&gt;<br/>&gt; Somewhat embarrassing to admit the time frame and then have to see and<br/>&gt; know the miserably low skill level I&#39;ve never broken out of or even<br/>&gt; maintained.<br/>&gt;<br/>&gt; So all and any ideas, suggestions etc would be well received on this end.<br/>&gt;<br/>&gt; <br/><br/>I would suggest to create a github or similar service account and put <br/>some important code snippets there.<br/>Document them, especially tricky parts.<br/><br/>Regards,<br/>Alex<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124650.html Sat, 26 Jul 2014 12:52:40 +0000 Re: Date::Parse and strange dates by Janek Schleicher On 25.07.2014 18:54, Chris Knipe wrote:<br/>&gt; I have the odd (very rare) case where I am given a date in an incorrect<br/>&gt; format. I already use Date::Parse to convert the dates to a unix<br/>&gt; timestamp, and it&rsquo;s working incredibly well. However, on the rare case<br/>&gt; that I get incorrect dates, Date::Parse does not like them either and<br/>&gt; errors out. The formats in question that I can&rsquo;t parse basically looks like<br/>&gt;<br/>&gt; Thu, 23 Oct 2008 12:06:48+0400<br/>&gt;<br/>&gt; Note the lack of a space between the seconds and the timezone.<br/>&gt;<br/>&gt; Is there a simple quick way to fix that by means of a regex?<br/><br/>There is, as others have pointed out.<br/><br/>An other way would be to use a different module, that is more relaxed <br/>when interpreting dates/times to the underlying format, like the <br/>`fuzzier` Time::ParseDate (https://metacpan.org/pod/Time::ParseDate).<br/>It works for your example like in that snippet below:<br/><br/>perl -MDate::Parse -MTime::ParseDate -E &#39;my $t = &quot;Thu, 23 Oct 2008 <br/>12:06:48+0400&quot;; say &quot;$t: str2time=&quot;,str2time($t),&quot; <br/>parsedate=&quot;,parsedate($t); $t =~ s/\+/ +/; say &quot;$t: <br/>str2time=&quot;,str2time($t),&quot; parsedate=&quot;,parsedate($t)&#39;<br/><br/>Thu, 23 Oct 2008 12:06:48+0400: str2time= parsedate=1224749208<br/>Thu, 23 Oct 2008 12:06:48 +0400: str2time=1224749208 parsedate=1224749208<br/><br/><br/>Greetings,<br/>Janek Schleicher<br/><br/>PS: As Rob already mentioned, you should contact the author of <br/>Date::Parse also.<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124649.html Sat, 26 Jul 2014 08:59:09 +0000 Re: Date::Parse and strange dates by Rob Dixon On 25/07/2014 17:54, Chris Knipe wrote:<br/>&gt; Hi All,<br/>&gt;<br/>&gt; I have the odd (very rare) case where I am given a date in an incorrect<br/>&gt; format. I already use Date::Parse to convert the dates to a unix<br/>&gt; timestamp, and it&rsquo;s working incredibly well. However, on the rare case<br/>&gt; that I get incorrect dates, Date::Parse does not like them either and<br/>&gt; errors out. The formats in question that I can&rsquo;t parse basically looks like<br/>&gt;<br/>&gt; Thu, 23 Oct 2008 12:06:48+0400<br/>&gt;<br/>&gt; Note the lack of a space between the seconds and the timezone.<br/><br/>Date::Parse is amiss here because (at least) the time part of that<br/>string complies with ISO 8601. i.e. the space *shouldn&#39;t* be there.<br/><br/>Ridiculously, you must *pay* ISO to get a copy of their standard, but<br/>W3C&#39;s version is here<br/><br/> http://www.w3.org/TR/NOTE-datetime<br/><br/>To fix the immediate problem I would amend every date-time string using<br/><br/> s/\S\K([-+][0-9]+)\z/ $1/<br/><br/>but I also think it&#39;s worth emailing<br/><br/> Graham Barr &lt;gbarr@pobox.com&gt;<br/><br/>the author of Date::Parse to get his angle on this.<br/><br/>Rob<br/><br/><br/><br/><br/><br/><br/><br/>---<br/>This email is free from viruses and malware because avast! Antivirus protection is active.<br/>http://www.avast.com<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124648.html Sat, 26 Jul 2014 00:04:03 +0000 Re: Date::Parse and strange dates by Jim Gibson <br/>On Jul 25, 2014, at 9:54 AM, Chris Knipe wrote:<br/><br/>&gt; Hi All,<br/>&gt; <br/>&gt; I have the odd (very rare) case where I am given a date in an incorrect format. I already use Date::Parse to convert the dates to a unix timestamp, and it&rsquo;s working incredibly well. However, on the rare case that I get incorrect dates, Date::Parse does not like them either and errors out. The formats in question that I can&rsquo;t parse basically looks like<br/>&gt; <br/>&gt; Thu, 23 Oct 2008 12:06:48+0400<br/>&gt; <br/>&gt; Note the lack of a space between the seconds and the timezone.<br/>&gt; <br/>&gt; Is there a simple quick way to fix that by means of a regex?<br/><br/>The simplest way to fix that particular error might be this regex:<br/><br/> s/(\d)([+-])/$1 $2/<br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124647.html Fri, 25 Jul 2014 17:21:20 +0000 Re: Date::Parse and strange dates by Brian Fraser On Fri, Jul 25, 2014 at 6:54 PM, Chris Knipe &lt;savage@savage.za.org&gt; wrote:<br/>&gt; Hi All,<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; I have the odd (very rare) case where I am given a date in an incorrect<br/>&gt; format. I already use Date::Parse to convert the dates to a unix timestamp,<br/>&gt; and it&rsquo;s working incredibly well. However, on the rare case that I get<br/>&gt; incorrect dates, Date::Parse does not like them either and errors out. The<br/>&gt; formats in question that I can&rsquo;t parse basically looks like<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; Thu, 23 Oct 2008 12:06:48+0400<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; Note the lack of a space between the seconds and the timezone.<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; Is there a simple quick way to fix that by means of a regex?<br/><br/>Depends on the data, of course. This might do the trick:<br/><br/>s/[0-9]\K\+/ +/<br/><br/>Or in maintainable form:<br/><br/>s&lt;<br/> [0-9] # A digit..<br/> \K # (do not touch anything before this when replacing)<br/> \+ # ...followed by a plus sign<br/>&gt;&lt; +&gt;x;<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124646.html Fri, 25 Jul 2014 17:20:12 +0000 Re: Date::Parse and strange dates by Chris Knipe On Fri, Jul 25, 2014 at 7:12 PM, Andy Bach &lt;afbach@gmail.com&gt; wrote:<br/>&gt;<br/>&gt; On Fri, Jul 25, 2014 at 11:54 AM, Chris Knipe &lt;savage@savage.za.org&gt; wrote:<br/>&gt;&gt;<br/>&gt;&gt; Thu, 23 Oct 2008 12:06:48+0400<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; Note the lack of a space between the seconds and the timezone.<br/>&gt;<br/>&gt;<br/>&gt; Well, depending upon the consistency of your one bad case (presuming the<br/>&gt; date string is in $_ for the moment):<br/>&gt; if ( s/(\w+, \s+ \d+ \s+ \w+ \s+ \d+ \s+ [\d:]+) ([+-]\d+/$1 $2/xms )<br/>&gt; warn(&quot;Fixed bad date str $_\n&quot;);<br/>&gt; }<br/>&gt;<br/>&gt; either after Date::Parse has failed (and so retry) or a test before, just in<br/>&gt; case.<br/><br/>Would have to be something generic I suppose. Will look through<br/>Regex::Common as someone else suggested as well. Now that +- timezone<br/>is fixed, now the next one just crops up...<br/><br/>Mi, 18 Nov 09 12:39:57 GMT<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124645.html Fri, 25 Jul 2014 17:16:17 +0000 Re: Date::Parse and strange dates by Andy Bach On Fri, Jul 25, 2014 at 11:54 AM, Chris Knipe &lt;savage@savage.za.org&gt; wrote:<br/><br/>&gt; Thu, 23 Oct 2008 12:06:48+0400<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; Note the lack of a space between the seconds and the timezone.<br/>&gt;<br/><br/>Well, depending upon the consistency of your one bad case (presuming the<br/>date string is in $_ for the moment):<br/>if ( s/(\w+, \s+ \d+ \s+ \w+ \s+ \d+ \s+ [\d:]+) ([+-]\d+/$1 $2/xms )<br/> warn(&quot;Fixed bad date str $_\n&quot;);<br/>}<br/><br/>either after Date::Parse has failed (and so retry) or a test before, just<br/>in case.<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/07/msg124644.html Fri, 25 Jul 2014 17:12:52 +0000 Re: Date::Parse and strange dates by Shawn H Corey On Fri, 25 Jul 2014 18:54:25 +0200<br/>Chris Knipe &lt;savage@savage.za.org&gt; wrote:<br/><br/>&gt; Is there a simple quick way to fix that by means of a regex?<br/><br/>Have you checked Regexp::Common ? It has a whole bunch of date regexps.<br/><br/><br/>-- <br/>Don&#39;t stop where the ink does.<br/> Shawn<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124643.html Fri, 25 Jul 2014 17:08:55 +0000 Date::Parse and strange dates by Chris Knipe Hi All,<br/><br/> <br/><br/>I have the odd (very rare) case where I am given a date in an incorrect<br/>format. I already use Date::Parse to convert the dates to a unix timestamp,<br/>and it&#39;s working incredibly well. However, on the rare case that I get<br/>incorrect dates, Date::Parse does not like them either and errors out. The<br/>formats in question that I can&#39;t parse basically looks like<br/><br/> <br/><br/>Thu, 23 Oct 2008 12:06:48+0400<br/><br/> <br/><br/>Note the lack of a space between the seconds and the timezone.<br/><br/> <br/><br/>Is there a simple quick way to fix that by means of a regex?<br/><br/> <br/><br/>Many thanks,<br/><br/>Chris.<br/><br/> <br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124642.html Fri, 25 Jul 2014 16:54:21 +0000 Re: perl -pi problem by v.grinbergs Reply to question below...<br/><br/>Use \@ to escape a @. Otherwise @ will be interpreted by Perl as the<br/>start of a name of an array.<br/>In a similar manner, use \\ to escape a \.<br/>Your example code uses \\\\ where \\ is needed.<br/><br/>Here is the revised code (which works on Perl 5.14 on Debian Linux):<br/><br/>perl -pi -e &#39;s/\\begin{document}/\\makeatletter\n\\AtEndDocument{\\if<br/>\@longauth\\\@longauthfalse\\fi}\n\\makeatother\n\n\\begin{document}/g&#39;<br/>test.tex<br/><br/>With the -i switch, you are editing file test.tex. When debugging, you<br/>might want to omit the -i switch. The changed text will be written to<br/>STDOUT instead of the file. That will make tweaking the code and<br/>re-testing easier.<br/><br/>On Wed, 2014-07-23 at 13:07 +0000, Mohamed HOUSSNI wrote:<br/>&gt; Dear list,<br/>&gt; <br/>&gt; Is that someone could take a look at this problem ?<br/>&gt; <br/>&gt; Thanks a lot,<br/>&gt;<br/>&gt; MHTML Document attachment (help)<br/>&gt; &gt; -------- Forwarded Message --------<br/>&gt; &gt; From: Mohamed HOUSSNI &lt;mohamed.houssni@e-press.co.ma&gt;<br/>&gt; &gt; To: beginners@perl.org<br/>&gt; &gt; Subject: help<br/>&gt; &gt; Date: Tue, 22 Jul 2014 12:00:31 +0000<br/>&gt; &gt; From: Mohamed HOUSSNI &lt;mohamed.houssni@e-press.co.ma&gt;<br/>&gt; &gt; User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716)<br/>&gt; &gt; To: beginners@perl.org<br/>&gt; &gt; Subject: help<br/>&gt; &gt; <br/>&gt; &gt; Dear list,<br/>&gt; &gt; <br/>&gt; &gt; I am writing to you about a problem &quot;perl -pi&quot;. I&#39;m trying to<br/>replace a <br/>&gt; &gt; string by another which contains the caracter array declaration &quot;@&quot;<br/>&gt; &gt; ie <br/>&gt; &gt; substitute &quot;blabla&quot; with &quot;\if@longtable&quot; but I can not do it via &gt; &gt;<br/>&gt; &gt; &quot;perl <br/>&gt; &gt; -pi -e&quot;. Below my command line<br/><br/>&gt; &gt; perl -pi -e <br/>&gt; &gt; &#39;s/\\\\begin{document}/\\\\makeatletter\n\\\\AtEndDocument{\\\\if<br/>\@longauth\\\\\@longauthfalse\\\\fi}\n\\\\makeatother\n\n\\\<br/>\begin{document}/g&#39; <br/>test.tex<br/><br/>&gt; &gt; To insert in &quot;test.tex&quot;<br/><br/>&gt; &gt; \makeatletter<br/>&gt; &gt; \AtEndDocument{\if@longauth\@longauthfalse\fi}<br/>&gt; &gt; \makeatother<br/><br/>&gt; &gt; Thank you in advance for your help.<br/><br/>&gt; &gt; -- <br/>&gt; &gt; -------------------<br/>&gt; &gt; Dr. Mohamed Houssni<br/><br/><br/><br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124641.html Thu, 24 Jul 2014 13:26:04 +0000 [Fwd: help] by Mohamed HOUSSNI Dear list,<br/><br/>Is that someone could take a look at this problem ?<br/><br/>Thanks a lot,<br/><br/>-- <br/>-------------------<br/>Dr. Mohamed Houssni<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124640.html Thu, 24 Jul 2014 06:41:46 +0000 Re: Problem installing a module by Chris On Wed, 2014-07-23 at 21:25 -0500, Chris wrote:<br/>&gt; On Thu, 2014-07-24 at 02:23 +1200, Kent Fredric wrote:<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; On 24 July 2014 02:06, Sam &lt;perl@net153.net&gt; wrote:<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; Can you post those changes or a link to the mailing list? It<br/>&gt; &gt; might be wise for someone to update the module....<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; --Sam<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; Upstream have conferred they want to be released from maintaining it<br/>&gt; &gt; and are looking for somebody take up the mantle.<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; https://rt.cpan.org/Ticket/Display.html?id=86411<br/>&gt; &gt; <br/>&gt; &gt; -- <br/>&gt; &gt; Kent <br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; &gt; KENTNL - https://metacpan.org/author/KENTNL<br/>&gt; &gt; <br/>&gt; &gt; <br/>&gt; Kent, here are the changes as attachments. The only changes were in the<br/>&gt; &#39;t&#39; folder.<br/>&gt; <br/><br/>Somehow I forgot 01ping.t<br/><br/>-- <br/>Chris<br/>31.11&Acirc;&deg;N 97.89&Acirc;&deg;W (Elev. 1092 ft)<br/>21:34:54 up 3 days, 3:49, 1 user, load average: 0.48, 0.45, 0.36<br/>Ubuntu 14.04 LTS, kernel 3.13.0-32-generic<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124639.html Thu, 24 Jul 2014 02:35:54 +0000 Re: Problem installing a module by Chris On Thu, 2014-07-24 at 02:23 +1200, Kent Fredric wrote:<br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; On 24 July 2014 02:06, Sam &lt;perl@net153.net&gt; wrote:<br/>&gt; <br/>&gt; <br/>&gt; Can you post those changes or a link to the mailing list? It<br/>&gt; might be wise for someone to update the module....<br/>&gt; <br/>&gt; <br/>&gt; --Sam<br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; Upstream have conferred they want to be released from maintaining it<br/>&gt; and are looking for somebody take up the mantle.<br/>&gt; <br/>&gt; <br/>&gt; https://rt.cpan.org/Ticket/Display.html?id=86411<br/>&gt; <br/>&gt; -- <br/>&gt; Kent <br/>&gt; <br/>&gt; <br/>&gt; KENTNL - https://metacpan.org/author/KENTNL<br/>&gt; <br/>&gt; <br/>Kent, here are the changes as attachments. The only changes were in the<br/>&#39;t&#39; folder.<br/><br/>-- <br/>Chris<br/>31.11&Acirc;&deg;N 97.89&Acirc;&deg;W (Elev. 1092 ft)<br/>21:21:03 up 3 days, 3:35, 1 user, load average: 0.34, 0.22, 0.23<br/>Ubuntu 14.04 LTS, kernel 3.13.0-32-generic<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124638.html Thu, 24 Jul 2014 02:25:49 +0000 Re: Problem installing a module by Chris On Thu, 2014-07-24 at 02:23 +1200, Kent Fredric wrote:<br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; On 24 July 2014 02:06, Sam &lt;perl@net153.net&gt; wrote:<br/>&gt; <br/>&gt; <br/>&gt; Can you post those changes or a link to the mailing list? It<br/>&gt; might be wise for someone to update the module....<br/>&gt; <br/>&gt; <br/>&gt; --Sam<br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; Upstream have conferred they want to be released from maintaining it<br/>&gt; and are looking for somebody take up the mantle.<br/>&gt; <br/>&gt; <br/>&gt; https://rt.cpan.org/Ticket/Display.html?id=86411<br/>&gt; <br/>&gt; -- <br/>&gt; Kent <br/>&gt; <br/>&gt; <br/>&gt; KENTNL - https://metacpan.org/author/KENTNL<br/>&gt; <br/>Kent, I&#39;ve forwarded this to the person who assisted me with the<br/>changes. Hopefully he&#39;ll take up the challenge. I&#39;ll be posting the<br/>changes I made here in a few, however, there are still problems getting<br/>it to work.<br/><br/>Chris<br/><br/><br/>-- <br/>Chris<br/>31.11&Acirc;&deg;N 97.89&Acirc;&deg;W (Elev. 1092 ft)<br/>17:14:56 up 2 days, 23:29, 3 users, load average: 0.15, 0.13, 0.21<br/>Ubuntu 14.04 LTS, kernel 3.13.0-32-generic<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124637.html Wed, 23 Jul 2014 22:16:20 +0000 Re: Problem installing a module by Andy Bach On Wed, Jul 23, 2014 at 10:45 AM, Chris &lt;cpollock@embarqmail.com&gt; wrote:<br/><br/>&gt; Sure, I&#39;ll post the files in /build/t that I changed to pastebin. I&#39;m<br/>&gt; still not confident that it&#39;s working though as I see this in my syslog:<br/>&gt;<br/>&gt; Jul 23 09:02:13 localhost clamd[11467]: ScanStream(127.0.0.1@1221):<br/>&gt; Can&#39;t create temporary file.<br/>&gt;<br/><br/>That&#39;s likely a permissions problem; either the tmp file location doesn&#39;t<br/>exist or is owned/group/permed (on a linux box) to a configuration that<br/>won&#39;t let the user running ScanStream to write there.<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/07/msg124636.html Wed, 23 Jul 2014 16:06:42 +0000 Re: Problem installing a module by Chris On Wed, 2014-07-23 at 09:06 -0500, Sam wrote:<br/>&gt; On 07/23/2014 07:53 AM, Chris wrote:<br/>&gt; &gt; On Thu, 2014-07-24 at 00:28 +1200, Kent Fredric wrote:<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; On 22 July 2014 06:05, Chris &lt;cpollock@embarqmail.com&gt; wrote:<br/>&gt; &gt;&gt; I&#39;m not a programmer so I apologize if I&#39;m on the wrong list<br/>&gt; &gt;&gt; but I&#39;m<br/>&gt; &gt;&gt; looking for some assistance in installing File::Scan::ClamAV.<br/>&gt; &gt;&gt; I&#39;ve tried<br/>&gt; &gt;&gt; multiple ways, CPAN and from source, to install this and I<br/>&gt; &gt;&gt; constantly<br/>&gt; &gt;&gt; get the errors shown here http://pastebin.com/drEmcSc5 I need<br/>&gt; &gt;&gt; to get<br/>&gt; &gt;&gt; this installed so I can interface SpamAssassin with ClamAV.<br/>&gt; &gt;&gt; Any help or<br/>&gt; &gt;&gt; advice would be appreciated. This is being installed on a<br/>&gt; &gt;&gt; Ubuntu 14.04<br/>&gt; &gt;&gt; LTS box.<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; Here, your problem i that the modules fail testing, and that<br/>&gt; &gt;&gt; subsequently don&#39;t install due to failing testing.<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; The reason for it is probable either:<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; a) Your system ClamAV is no longer compatible with the ClamAV module<br/>&gt; &gt;&gt; b) The ClamAV module is no longer compatible with some dependency<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; c) The ClamAV module is no longer compatible with perl<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; Unfortunately, all of these mean the solution to your problem will be<br/>&gt; &gt;&gt; specific to the module, not a general problem with Perl Module<br/>&gt; &gt;&gt; installation.<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; 1. The ClamAV module hasn&#39;t seen maintenance since 2009.<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; 2. However, the good news is there are some passes on recent perls<br/>&gt; &gt;&gt; ( http://matrix.cpantesters.org/?dist=File-Scan-ClamAV+1.91 ),<br/>&gt; &gt;&gt; indicating its more likely to be a ClamAV/Dependency issue.<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; 3. There are however, 7 open bugs<br/>&gt; &gt;&gt; https://rt.cpan.org/Public/Dist/Display.html?Name=File-Scan-ClamAV<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; 4. This bug suggests indeed, that the ClamAV API has been changed, and<br/>&gt; &gt;&gt; the module has not been updated to adjust<br/>&gt; &gt;&gt; https://rt.cpan.org/Public/Bug/Display.html?id=54205<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; 5. .... which suggests you may want to try installing an older version<br/>&gt; &gt;&gt; of ClamAV such as ClamAV-0.93 and see if that helps<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; --<br/>&gt; &gt;&gt; Kent<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt;<br/>&gt; &gt;&gt; KENTNL - https://metacpan.org/author/KENTNL<br/>&gt; &gt;<br/>&gt; &gt; Thanks Kent, someone on the ClamAV mailing list sent me a list of<br/>&gt; &gt; changes to be made in the &#39;t&#39; folder to the tests and to the &#39;mkconf.pl&#39;<br/>&gt; &gt; file there. After that it installed flawlessly.<br/>&gt; &gt;<br/>&gt; &gt; Thank you for your reply<br/>&gt; &gt; Chris<br/>&gt; &gt;<br/>&gt; <br/>&gt; Can you post those changes or a link to the mailing list? It might be <br/>&gt; wise for someone to update the module....<br/>&gt; <br/>&gt; <br/>&gt; --Sam<br/>&gt; <br/><br/>Sure, I&#39;ll post the files in /build/t that I changed to pastebin. I&#39;m<br/>still not confident that it&#39;s working though as I see this in my syslog:<br/><br/>Jul 23 09:02:13 localhost clamd[11467]: ScanStream(127.0.0.1@1221):<br/>Can&#39;t create temporary file.<br/><br/>In reading the manpage for clamd I notice that &#39;ScanStream has been<br/>depreciated and has been replaced with &#39;InStream&#39;. Looking at<br/>&#39;ClamAV.pm&#39; I&#39;m wondering if I need to make changes to it?<br/>http://pastebin.com/WgTT2wSA<br/><br/>Should I go ahead and post the other changes that were made or wait to<br/>make sure it&#39;s running correctly?<br/><br/>-- <br/>Chris<br/>31.11&Acirc;&deg;N 97.89&Acirc;&deg;W (Elev. 1092 ft)<br/>10:27:24 up 2 days, 16:41, 1 user, load average: 0.10, 0.26, 0.23<br/>Ubuntu 14.04 LTS, kernel 3.13.0-32-generic<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124635.html Wed, 23 Jul 2014 15:45:13 +0000 Re: Problem installing a module by Kent Fredric On 24 July 2014 02:06, Sam &lt;perl@net153.net&gt; wrote:<br/><br/>&gt;<br/>&gt; Can you post those changes or a link to the mailing list? It might be wise<br/>&gt; for someone to update the module....<br/>&gt;<br/>&gt;<br/>&gt; --Sam<br/>&gt;<br/>&gt;<br/>Upstream have conferred they want to be released from maintaining it and<br/>are looking for somebody take up the mantle.<br/><br/>https://rt.cpan.org/Ticket/Display.html?id=86411<br/><br/>-- <br/>Kent<br/><br/>*KENTNL* - https://metacpan.org/author/KENTNL<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124634.html Wed, 23 Jul 2014 14:23:14 +0000 Re: Problem installing a module by Sam On 07/23/2014 07:53 AM, Chris wrote:<br/>&gt; On Thu, 2014-07-24 at 00:28 +1200, Kent Fredric wrote:<br/>&gt;&gt;<br/>&gt;&gt; On 22 July 2014 06:05, Chris &lt;cpollock@embarqmail.com&gt; wrote:<br/>&gt;&gt; I&#39;m not a programmer so I apologize if I&#39;m on the wrong list<br/>&gt;&gt; but I&#39;m<br/>&gt;&gt; looking for some assistance in installing File::Scan::ClamAV.<br/>&gt;&gt; I&#39;ve tried<br/>&gt;&gt; multiple ways, CPAN and from source, to install this and I<br/>&gt;&gt; constantly<br/>&gt;&gt; get the errors shown here http://pastebin.com/drEmcSc5 I need<br/>&gt;&gt; to get<br/>&gt;&gt; this installed so I can interface SpamAssassin with ClamAV.<br/>&gt;&gt; Any help or<br/>&gt;&gt; advice would be appreciated. This is being installed on a<br/>&gt;&gt; Ubuntu 14.04<br/>&gt;&gt; LTS box.<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; Here, your problem i that the modules fail testing, and that<br/>&gt;&gt; subsequently don&#39;t install due to failing testing.<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; The reason for it is probable either:<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; a) Your system ClamAV is no longer compatible with the ClamAV module<br/>&gt;&gt; b) The ClamAV module is no longer compatible with some dependency<br/>&gt;&gt;<br/>&gt;&gt; c) The ClamAV module is no longer compatible with perl<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; Unfortunately, all of these mean the solution to your problem will be<br/>&gt;&gt; specific to the module, not a general problem with Perl Module<br/>&gt;&gt; installation.<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; 1. The ClamAV module hasn&#39;t seen maintenance since 2009.<br/>&gt;&gt;<br/>&gt;&gt; 2. However, the good news is there are some passes on recent perls<br/>&gt;&gt; ( http://matrix.cpantesters.org/?dist=File-Scan-ClamAV+1.91 ),<br/>&gt;&gt; indicating its more likely to be a ClamAV/Dependency issue.<br/>&gt;&gt;<br/>&gt;&gt; 3. There are however, 7 open bugs<br/>&gt;&gt; https://rt.cpan.org/Public/Dist/Display.html?Name=File-Scan-ClamAV<br/>&gt;&gt;<br/>&gt;&gt; 4. This bug suggests indeed, that the ClamAV API has been changed, and<br/>&gt;&gt; the module has not been updated to adjust<br/>&gt;&gt; https://rt.cpan.org/Public/Bug/Display.html?id=54205<br/>&gt;&gt;<br/>&gt;&gt; 5. .... which suggests you may want to try installing an older version<br/>&gt;&gt; of ClamAV such as ClamAV-0.93 and see if that helps<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; --<br/>&gt;&gt; Kent<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; KENTNL - https://metacpan.org/author/KENTNL<br/>&gt;<br/>&gt; Thanks Kent, someone on the ClamAV mailing list sent me a list of<br/>&gt; changes to be made in the &#39;t&#39; folder to the tests and to the &#39;mkconf.pl&#39;<br/>&gt; file there. After that it installed flawlessly.<br/>&gt;<br/>&gt; Thank you for your reply<br/>&gt; Chris<br/>&gt;<br/><br/>Can you post those changes or a link to the mailing list? It might be <br/>wise for someone to update the module....<br/><br/><br/>--Sam<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124633.html Wed, 23 Jul 2014 14:06:52 +0000 Re: Problem installing a module by Chris On Thu, 2014-07-24 at 00:28 +1200, Kent Fredric wrote:<br/>&gt; <br/>&gt; On 22 July 2014 06:05, Chris &lt;cpollock@embarqmail.com&gt; wrote:<br/>&gt; I&#39;m not a programmer so I apologize if I&#39;m on the wrong list<br/>&gt; but I&#39;m<br/>&gt; looking for some assistance in installing File::Scan::ClamAV.<br/>&gt; I&#39;ve tried<br/>&gt; multiple ways, CPAN and from source, to install this and I<br/>&gt; constantly<br/>&gt; get the errors shown here http://pastebin.com/drEmcSc5 I need<br/>&gt; to get<br/>&gt; this installed so I can interface SpamAssassin with ClamAV.<br/>&gt; Any help or<br/>&gt; advice would be appreciated. This is being installed on a<br/>&gt; Ubuntu 14.04<br/>&gt; LTS box.<br/>&gt; <br/>&gt; <br/>&gt; Here, your problem i that the modules fail testing, and that<br/>&gt; subsequently don&#39;t install due to failing testing.<br/>&gt; <br/>&gt; <br/>&gt; The reason for it is probable either:<br/>&gt; <br/>&gt; <br/>&gt; a) Your system ClamAV is no longer compatible with the ClamAV module<br/>&gt; b) The ClamAV module is no longer compatible with some dependency<br/>&gt; <br/>&gt; c) The ClamAV module is no longer compatible with perl<br/>&gt; <br/>&gt; <br/>&gt; Unfortunately, all of these mean the solution to your problem will be<br/>&gt; specific to the module, not a general problem with Perl Module<br/>&gt; installation.<br/>&gt; <br/>&gt; <br/>&gt; 1. The ClamAV module hasn&#39;t seen maintenance since 2009.<br/>&gt; <br/>&gt; 2. However, the good news is there are some passes on recent perls<br/>&gt; ( http://matrix.cpantesters.org/?dist=File-Scan-ClamAV+1.91 ),<br/>&gt; indicating its more likely to be a ClamAV/Dependency issue.<br/>&gt; <br/>&gt; 3. There are however, 7 open bugs<br/>&gt; https://rt.cpan.org/Public/Dist/Display.html?Name=File-Scan-ClamAV <br/>&gt; <br/>&gt; 4. This bug suggests indeed, that the ClamAV API has been changed, and<br/>&gt; the module has not been updated to adjust<br/>&gt; https://rt.cpan.org/Public/Bug/Display.html?id=54205<br/>&gt; <br/>&gt; 5. .... which suggests you may want to try installing an older version<br/>&gt; of ClamAV such as ClamAV-0.93 and see if that helps<br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; <br/>&gt; -- <br/>&gt; Kent <br/>&gt; <br/>&gt; <br/>&gt; KENTNL - https://metacpan.org/author/KENTNL<br/><br/>Thanks Kent, someone on the ClamAV mailing list sent me a list of<br/>changes to be made in the &#39;t&#39; folder to the tests and to the &#39;mkconf.pl&#39;<br/>file there. After that it installed flawlessly. <br/><br/>Thank you for your reply<br/>Chris<br/><br/>-- <br/>Chris<br/>31.11&Acirc;&deg;N 97.89&Acirc;&deg;W (Elev. 1092 ft)<br/>07:43:02 up 2 days, 13:57, 1 user, load average: 0.11, 0.25, 0.24<br/>Ubuntu 14.04 LTS, kernel 3.13.0-32-generic<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124632.html Wed, 23 Jul 2014 12:54:00 +0000 Re: Problem installing a module by Kent Fredric On 22 July 2014 06:05, Chris &lt;cpollock@embarqmail.com&gt; wrote:<br/><br/>&gt; I&#39;m not a programmer so I apologize if I&#39;m on the wrong list but I&#39;m<br/>&gt; looking for some assistance in installing File::Scan::ClamAV. I&#39;ve tried<br/>&gt; multiple ways, CPAN and from source, to install this and I constantly<br/>&gt; get the errors shown here http://pastebin.com/drEmcSc5 I need to get<br/>&gt; this installed so I can interface SpamAssassin with ClamAV. Any help or<br/>&gt; advice would be appreciated. This is being installed on a Ubuntu 14.04<br/>&gt; LTS box.<br/>&gt;<br/><br/>Here, your problem i that the modules fail testing, and that subsequently<br/>don&#39;t install due to failing testing.<br/><br/>The reason for it is probable either:<br/><br/>a) Your system ClamAV is no longer compatible with the ClamAV module<br/>b) The ClamAV module is no longer compatible with some dependency<br/>c) The ClamAV module is no longer compatible with perl<br/><br/>Unfortunately, all of these mean the solution to your problem will be<br/>specific to the module, not a general problem with Perl Module installation.<br/><br/>1. The ClamAV module hasn&#39;t seen maintenance since 2009.<br/>2. However, the good news is there are some passes on recent perls (<br/>http://matrix.cpantesters.org/?dist=File-Scan-ClamAV+1.91 ), indicating its<br/>more likely to be a ClamAV/Dependency issue.<br/>3. There are however, 7 open bugs<br/>https://rt.cpan.org/Public/Dist/Display.html?Name=File-Scan-ClamAV<br/>4. This bug suggests indeed, that the ClamAV API has been changed, and the<br/>module has not been updated to adjust<br/>https://rt.cpan.org/Public/Bug/Display.html?id=54205<br/>5. .... which suggests you may want to try installing an older version of<br/>ClamAV such as ClamAV-0.93 and see if that helps<br/><br/><br/><br/>-- <br/>Kent<br/><br/>*KENTNL* - https://metacpan.org/author/KENTNL<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124631.html Wed, 23 Jul 2014 12:28:55 +0000 Re: Please check my logic by Mike McClain On Mon, Jul 21, 2014 at 04:01:05PM -0600, Sherman Willden wrote:<br/>&lt;snip&gt;<br/>&gt;<br/>&gt; I have several files and I attached one of them. I want to sort the file<br/>&gt; and remove duplicate lines. The file is a list of key phrases to search the<br/>&gt; internet for. These are long lines so I don&#39;t know if this will work. I<br/>&gt; would like the file to be generic. Is my logic below correct?<br/>&gt;<br/>&gt; Check perl file for two inputs: &lt;file-to-be-read-from&gt; &lt;file-to-write-to&gt;<br/>&gt; Create array which will end up with all non-duplcate lines<br/>&gt; Open &lt;file-to-be-read-from&gt;<br/>&gt; Read in &lt;file-to-be-read-from&gt;<br/>&gt; Search the array<br/>&gt; If the line read in is not in the array, place it in the array<br/>&gt; Close &lt;file-to-be-read-from&gt;<br/>&gt; Open &lt;file-to-write-to&gt;<br/>&gt; For each line in the array, write that line to &lt;file-to-write-to&gt;<br/>&gt; Close &lt;file-to-write-to&gt;<br/>&gt; Sort &lt;file-to-write-to&gt;<br/>&gt;<br/>&lt;snip&gt;<br/><br/>Rather than scanning an array again and again assign each line as the<br/>key to a hash which will automatically delete the duplicates then<br/>assign the keys to an array and sort it before writing out to a file.<br/><br/>If you&#39;re working in a &#39;Nix system just use &#39;sort | uniq&#39; which will<br/>give you what you want much more quiclky.<br/><br/>Cheers,<br/>Mike<br/>--<br/>&quot;Be humble, and act wisely.&quot;<br/> - Jeralean Talley, America&#39;s oldest living woman<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124630.html Wed, 23 Jul 2014 08:17:33 +0000 Re: About staying brushed up on perl by Mike McClain On Sat, Jul 19, 2014 at 05:33:06PM -0400, Harry Putnam wrote:<br/>&lt;snip&gt;<br/>&gt;<br/>&gt; I mean an organized sort of structured kind of setup where you are<br/>&gt; expected to program something to a spec determined by someone<br/>&gt; knowledgeable.<br/>&gt;<br/><br/> Here&#39;s a suggestion that might give what you want but you&#39;ll have to<br/>supply the organization and structure yourself.<br/><br/> Every week someone posts a question of how to do something. If<br/>you&#39;ll workout a solution before reading the responses then compare<br/>your solution to those of others you&#39;ll be keeping your hand in and<br/>the many different solutions you see here will likely stick with you<br/>better.<br/><br/>&gt;<br/>&gt; So all and any ideas, suggestions etc would be well received on this end.<br/>&gt;<br/><br/>Enjoy,<br/>Mike<br/>--<br/>&quot;Be humble, and act wisely.&quot;<br/> - Jeralean Talley, America&#39;s oldest living woman<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124629.html Wed, 23 Jul 2014 08:17:27 +0000 Problem installing a module by Chris I&#39;m not a programmer so I apologize if I&#39;m on the wrong list but I&#39;m<br/>looking for some assistance in installing File::Scan::ClamAV. I&#39;ve tried<br/>multiple ways, CPAN and from source, to install this and I constantly<br/>get the errors shown here http://pastebin.com/drEmcSc5 I need to get<br/>this installed so I can interface SpamAssassin with ClamAV. Any help or<br/>advice would be appreciated. This is being installed on a Ubuntu 14.04<br/>LTS box.<br/><br/>Thank you<br/>Chris<br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124628.html Wed, 23 Jul 2014 08:17:25 +0000 Re: About staying brushed up on perl by Kent Fredric On 20 July 2014 09:33, Harry Putnam &lt;reader@newsguy.com&gt; wrote:<br/><br/>&gt;<br/>&gt; So all and any ideas, suggestions etc would be well received on this end.<br/>&gt;<br/>&gt;<br/>One approach that may help is to double down on CPAN. This may reduce the<br/>total number of tricks you have to learn, by finding proxies that do the<br/>tricks for you.<br/><br/>for instance:<br/><br/>- learn to set up a local perl installation with either perlbrew or<br/>local::lib<br/>- learn to install modules with cpanm<br/><br/>And after that point, a lot of things that might be tricks for you now, may<br/>be easier to implement in terms of a CPAN module.<br/><br/>For instance, a lot of my IO memory is now freed up for other tasks since<br/>using Path::Tiny. It handles enough of the common cases with straight<br/>forward and well documented syntax that I don&#39;t really need to remember how<br/>to do it any other way.<br/><br/>And for instance, I no longer much *need* to care about how to do OO<br/>correctly, because there&#39;s a lot of good modules that make this straight<br/>forward ( Class::Tiny, Moo, Moose , etc )<br/><br/><br/>Another poster referred to &quot;keeping an index of scripts&quot;, and in a sense,<br/>that&#39;s what CPAN is, just a much better organised much better structured,<br/>shared collection of script components.<br/><br/>Perhaps some problems you may solve yourself locally may also be amenable<br/>to being CPANized, which will help you later when you need to re-use that<br/>trick.<br/><br/>-- <br/>Kent<br/><br/>*KENTNL* - https://metacpan.org/author/KENTNL<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124627.html Tue, 22 Jul 2014 17:42:08 +0000 Re: Please check my logic by Sherman Willden Thank you all. I got off of windows 7 and went to my Ubuntu. Great stuff.<br/>Now I have to go back to windows 7 to take the course.<br/><br/>Sherman<br/><br/><br/>On Mon, Jul 21, 2014 at 4:14 PM, Paul Johnson &lt;paul@pjcj.net&gt; wrote:<br/><br/>&gt; On Mon, Jul 21, 2014 at 10:05:29PM +0000, Danny Wong (dannwong) wrote:<br/>&gt;<br/>&gt; &gt; Do it the perl way, hash it.<br/>&gt;<br/>&gt; Or do it the unix way:<br/>&gt;<br/>&gt; $ sort -u filename<br/>&gt;<br/>&gt; The -u means unique.<br/>&gt;<br/>&gt; You also have some lines that differ only in case, so you might prefer:<br/>&gt;<br/>&gt; $ sort -uf filename<br/>&gt;<br/>&gt; The -f means fold, which ignores lines which differ only in case.<br/>&gt;<br/>&gt; --<br/>&gt; Paul Johnson - paul@pjcj.net<br/>&gt; http://www.pjcj.net<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124626.html Mon, 21 Jul 2014 23:46:12 +0000 Re: Please check my logic by Paul Johnson On Mon, Jul 21, 2014 at 10:05:29PM +0000, Danny Wong (dannwong) wrote:<br/><br/>&gt; Do it the perl way, hash it.<br/><br/>Or do it the unix way:<br/><br/> $ sort -u filename<br/><br/>The -u means unique.<br/><br/>You also have some lines that differ only in case, so you might prefer:<br/><br/> $ sort -uf filename<br/><br/>The -f means fold, which ignores lines which differ only in case.<br/><br/>-- <br/>Paul Johnson - paul@pjcj.net<br/>http://www.pjcj.net<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124625.html Mon, 21 Jul 2014 22:14:31 +0000 Re: Please check my logic by Shawn H Corey On Mon, 21 Jul 2014 16:01:05 -0600<br/>Sherman Willden &lt;sherman.willden@gmail.com&gt; wrote:<br/><br/>&gt; I have several files and I attached one of them. I want to sort the<br/>&gt; file and remove duplicate lines.<br/><br/>If you&#39;re running bash:<br/><br/>sort -u file &gt; output_file<br/><br/><br/>-- <br/>Don&#39;t stop where the ink does.<br/> Shawn<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124624.html Mon, 21 Jul 2014 22:08:56 +0000 Re: Please check my logic by Danny Wong Sheman,<br/>Do it the perl way, hash it.<br/><br/> 1. Read both files<br/> 2. Put the lines into the key of a hash.<br/> * While (reading files)<br/> * $hash{$_}++;<br/><br/>Now you can print/process your hash key. There&#146;s shouldn&#146;t be duplicates.<br/>From: Sherman Willden &lt;sherman.willden@gmail.com&lt;mailto:sherman.willden@gmail.com&gt;&gt;<br/>Date: Monday, July 21, 2014 at 3:01 PM<br/>To: &quot;beginners@perl.org&lt;mailto:beginners@perl.org&gt;&quot; &lt;beginners@perl.org&lt;mailto:beginners@perl.org&gt;&gt;<br/>Subject: Please check my logic<br/><br/>I checked CPAN for remove duplicate lines and only found Code::CutNPaste which doesn&#39;t sound like what I want. So I will build what I want although I&#39;m sure it&#39;s out there somewhere.<br/><br/>I have several files and I attached one of them. I want to sort the file and remove duplicate lines. The file is a list of key phrases to search the internet for. These are long lines so I don&#39;t know if this will work. I would like the file to be generic. Is my logic below correct?<br/><br/>Check perl file for two inputs: &lt;file-to-be-read-from&gt; &lt;file-to-write-to&gt;<br/>Create array which will end up with all non-duplcate lines<br/>Open &lt;file-to-be-read-from&gt;<br/>Read in &lt;file-to-be-read-from&gt;<br/>Search the array<br/>If the line read in is not in the array, place it in the array<br/>Close &lt;file-to-be-read-from&gt;<br/>Open &lt;file-to-write-to&gt;<br/>For each line in the array, write that line to &lt;file-to-write-to&gt;<br/>Close &lt;file-to-write-to&gt;<br/>Sort &lt;file-to-write-to&gt;<br/><br/>Thank you;<br/><br/>Sherman<br/><br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124623.html Mon, 21 Jul 2014 22:06:04 +0000 Please check my logic by Sherman Willden Windows Server 2008 Domain Controller Options That Are Not Supported on an RODC <br/>Designate a Server as a Preferred Bridgehead Server <br/>Setting Site Link Properties <br/>What is the Global Catalog <br/>Understanding Sites, Subnets, and Site Links <br/>Active Directory Sites and Services <br/>Ntdsutil <br/>Dcpromo <br/>repadmin <br/>Preparing for Active Directory Installations <br/>Dcdiag the Availability of Operations Masters <br/>Transfer Domain Level Operations Master Roles <br/>Transfer the Domain Naming Master <br/>Transfer the Schema Master <br/>Transfer Domain Level Operations Master Roles <br/>Transfer the Domain Naming Master <br/>Transfer the Schema Master <br/>Add or Remove the Global Catalog <br/>Active Directory Domains and Trusts <br/>dcpromo <br/>Add Server Roles and Features <br/>Active Directory Administrative Center Overview <br/>Active Directory Administrative Center: Getting Started <br/>Planning Global Catalog Server Placement <br/>What is the Global Catalog <br/>Performance Tuning Guidelines for Windows Server 2008 R2 <br/>Understanding Trust Types <br/>Understanding Trust Direction <br/>Netdom Trust <br/>Understanding When to Create a Forest Trust <br/>Creating External Trusts <br/>Planning Operations Master Role Placement <br/>Planning Operations Master Role Placement <br/>Seizing an Operations Master Role <br/>Transferring an Operations Master Role <br/>How Active Directory Replication Topology Works <br/>Create a Site Link <br/>Understanding Active Directory Domain Services (AD DS) Functional Levels <br/>Planning Global Catalog Server Placement <br/>Read-Only Domain Controllers Step-by-Step Guide <br/>Enabling Universal Group Membership Caching on a Site <br/>Configure Intersite Replication Availability <br/>Understanding Replication Between Sites <br/>Designate a Server as a Preferred Bridgehead Server <br/>Operations Master Roles <br/>Scenarios for Installing AD DS <br/>Active Directory Federation Services <br/>Active Directory Certificate Services <br/>Active Directory Lightweight Directory Services <br/>Configuring Operations Master Roles <br/>Planning Operations Master Role Placement <br/>ntdsutil <br/>Managing Operations Master Roles <br/>Managing Branch Offices with Windows Server 2008 R2 <br/>Cached Domain Logon Information <br/>Adding the Global Catalog to a Site <br/>Read Only Domain Controllers Step-by-Step Guide <br/>Planning Operations Master Role Placement <br/>Transferring an Operations Master Role <br/>Configuring Operations Master Roles <br/>Overview of Active Directory Sites and Services <br/>Understanding Sites, Subnets, and Site Links <br/>Netdom <br/>Server Core Installation Option Getting Started Guide <br/>Active Directory Administrative Center Overview <br/>Set-ADForest <br/>Create an External Trust <br/>Active Directory Domains and Trusts <br/>Domain Controller Roles <br/>FSMO Placement and Optimization on Active Directory Domain Controllers <br/>Add or Remove the Global Catalog <br/>Active Directory Administrative Center: Getting Started <br/>Installing an Additional Domain Controller by Using the Graphical User Interface (GUII) <br/>Active Directory Domains and Trusts <br/>Creating a Site Link Design <br/>Understanding Replication Between Sites <br/>Active Directory Replication Concepts <br/>What Is the Global Catalog <br/>Planning Global Catalog Server Placement <br/>Enabling Universal Group Membership Caching in a Site <br/>Forcing the Removal of a Domain Controller <br/>Steps for Removing AD DS <br/>Understanding When To Create a Shortcut Trust <br/>Understanding Trust Types <br/>Select the Scope of Authentication for Users <br/>AD DS: Read-Only domain Controllers <br/>Determining the Schedule <br/>Checklist: Configure the Intersite Replication Schedule <br/>Enabling Universal Group Membership Caching in a Site <br/>RODC Frequently Asked Questions <br/>Repadmin <br/>Forcing Replication <br/>gpupdate <br/>Prepare a Windows 200 or Windows Server 2003 Forest Schema for a Domain Controller That Runs Windows Server 2008 or Windows Server 2008 R2 <br/>Prepare a Windows 2000 or a Windows Server 2003 Domain for a Domain Controller That Runs Windows Server 2008 or Windows Server 2008 R2 <br/>Understanding Active Directory Domain Services (AD DS) Functional Levels <br/>Trust Types: Active Directory <br/>Creating External Trusts <br/>Creating Domain and Forest Trusts <br/>Planning Global Catalog Server Placement <br/>Enabling Universal Group Membership Caching in a Site <br/>What is the Global Catalog <br/>Understanding When to Create a Forest Trust <br/>Understanding Trust Types <br/>Understanding Trust Direction <br/>Select the Scope of Authentication for Users <br/>Understanding Sites, Subnets, and Site Links <br/>Active Directory Sites and Services <br/>Ntdsutil <br/>Dcpromo <br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124622.html Mon, 21 Jul 2014 22:01:20 +0000 Re: About staying brushed up on perl by Sebastien Feugere I strongly recommend to use a cheat sheet or pocket reference books as this<br/>one http://shop.oreilly.com/product/0636920018476.do. Personally, I use a<br/>french language &quot;Perl Moderne&quot; pocket reference book (http://perlmoderne.fr/)<br/>that helps me almost daily.<br/><br/>I really love this way to learn because it&#39;s easy to carry, quick to learn,<br/>and honestly, especially when you do not program daily or even weekly in a<br/>language, sometimes, you don&#39;t even remember basic things.<br/>&#x1427;<br/><br/><br/>~$&amp;bast1<br/><br/><br/>On Sat, Jul 19, 2014 at 11:33 PM, Harry Putnam &lt;reader@newsguy.com&gt; wrote:<br/><br/>&gt; First my usage:<br/>&gt; Single user machines, home lan and basic networking.<br/>&gt; My specific perl usage is as often just something I want to do as it<br/>&gt; is some system oriented scripting.<br/>&gt; ------- ------- ---=--- ------- -------<br/>&gt;<br/>&gt; I&#39;ve been a perl user for several yrs, but never really stay<br/>&gt; programming steadily or even semi-steadily for very long at a time. A<br/>&gt; month would be a long time historically for me. And would likely be<br/>&gt; followed by many months or even a year or more of no perl activity.<br/>&gt;<br/>&gt; Consequently, all the cool little tricks one kind of stumbles on or<br/>&gt; more importantly, the piles of things learned on this list over years<br/>&gt; of following and using it seem to evaporate between engagements.<br/>&gt;<br/>&gt; I find myself having to ask about things I know I&#39;ve learned before.<br/>&gt; And even things I&#39;ve made notes about... I often find I&#39;ve forgotten<br/>&gt; enough that my notes don&#39;t make any sense to me any more.<br/>&gt;<br/>&gt; OK, OK, so maybe I&#39;m a little dimmer or down right thick skulled<br/>&gt; compared to most. Or even suffering from early onset senility... (I am<br/>&gt; 70 next March after all.. and it would be a nice face saving<br/>&gt; excuse...).<br/>&gt;<br/>&gt; BUT: is there some remedy in the way of keeping brushed up by weekly<br/>&gt; perl work or the like?<br/>&gt;<br/>&gt; I mean an organized sort of structured kind of setup where you are<br/>&gt; expected to program something to a spec determined by someone<br/>&gt; knowledgeable.<br/>&gt;<br/>&gt; Err... I guess I&#39;m describing a perl class, but in my case it would<br/>&gt; have been the longest running `class&#39; in recorded history... by now<br/>&gt; some 15 to 20 yrs.<br/>&gt;<br/>&gt; Somewhat embarrassing to admit the time frame and then have to see and<br/>&gt; know the miserably low skill level I&#39;ve never broken out of or even<br/>&gt; maintained.<br/>&gt;<br/>&gt; So all and any ideas, suggestions etc would be well received on this end.<br/>&gt;<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/07/msg124621.html Mon, 21 Jul 2014 16:14:08 +0000 Re: About staying brushed up on perl by Marilyn Sander, Ken Armstrong I am now 73 years old and retired one year ago. I used Perl extensively from 1998 until I retired. It can be hard to remember all the tricks, even when you use or write Perl often. When I learned or developed a useful technique, I would keep the program or a bit of it around. I have lots of old programs and pieces of programs. I never got so systematic as to index them for the particular techniques. When I would leave a job, I would take with me a couple of what I considered to be the best or most useful programs I had written. This might not have been totally legal, but I did not use any previous employer&#39;s programs for a new employer. I just kept the programs in my archive of programming technique samples.<br/>My most recent Perl project was analyzing a .csv file from a financial consultant. I moved some assets from him to another investment firm. The consultant got mad at me and would not provide a useful report. He just sent a .csv file with dates and amounts, which I analyzed with a Perl program.<br/>I also highly recommend the O&#39;Reilly books on Perl.<br/>Good luck with Perl.<br/>Marilyn<br/><br/>On Jul 21, 2014, at 6:34 AM, Shawn H Corey &lt;shawnhcorey@gmail.com&gt; wrote:<br/><br/>&gt; On Mon, 21 Jul 2014 15:01:10 +0200<br/>&gt; mimosinnet@gmail.com wrote:<br/>&gt; <br/>&gt;&gt; I have self-learned Perl about a couple of years ago and I am also<br/>&gt;&gt; having a similar use of Perl, so I often forget how I did things. I<br/>&gt;&gt; must also say that I am about to be 50 years old next December and I<br/>&gt;&gt; do not have any technical education as my degree is in psychology. I<br/>&gt;&gt; use http://perlweekly.com/ to see what is going on,<br/>&gt;&gt; http://perlmaven.com/ to remember how things are done and O&#39;Reilly if<br/>&gt;&gt; I need more in-depth understanding on a specific issue. Cheers!<br/>&gt; <br/>&gt; Welcome to Perl. Here are some links you might find useful:<br/>&gt; <br/>&gt; * official site &lt;http://www.perl.org/&gt;<br/>&gt; * beginners&#39; help &lt;http://learn.perl.org/faq/beginners.html&gt;<br/>&gt; * advance help &lt;http://perlmonks.org/&gt;<br/>&gt; * documentation &lt;http://perldoc.perl.org/&gt;<br/>&gt; * news &lt;http://perlsphere.net/&gt;<br/>&gt; * repository &lt;http://www.cpan.org/&gt;<br/>&gt; * blog &lt;http://blogs.perl.org/&gt;<br/>&gt; * regional groups &lt;http://www.pm.org/&gt;<br/>&gt; * videos &lt;http://perltv.org/&gt;<br/>&gt; <br/>&gt; <br/>&gt; -- <br/>&gt; Don&#39;t stop where the ink does.<br/>&gt; Shawn<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/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124620.html Mon, 21 Jul 2014 16:02:15 +0000 Re: About staying brushed up on perl by Shaji Kalidasan Greetings,<br/><br/>I self learned perl four years ago in the year 2010. The primary book from<br/>where I learned Perl programming is Learning Perl &lt;<br/>http://www.amazon.com/Learning-Perl-Randal-L-Schwartz/dp/1449303587/ref=sr_1_1<br/>&gt;<br/><br/>Then, I trained about 200+ students on Perl programming in the last 4 years<br/>besides managing to develop dozen of small Perl projects (&lt; 1 month<br/>projects) for clients of various sizes and then setup my own Perl<br/>programming site (targeted for beginners) ---&gt; http://www.perltoolbox.com/<br/><br/>This site is having 3 online quiz which uses the fundamental Perl concepts<br/>and some interview questions posed by my students.<br/><br/>http://www.perltoolbox.com/perl-quiz/perl-quiz-1.php<br/><br/>http://www.perltoolbox.com/perl-quiz/perl-quiz-2.php<br/><br/>http://www.perltoolbox.com/perl-quiz/perl-quiz-3.php<br/><br/>http://www.perltoolbox.com/perl-interview-questions.php<br/><br/>I am a passionate student of Perl and everyday I learn new concepts and<br/>theories form Perl beginners site and accomplished Perlers in this<br/>community. I too want to improve my Perl programming habits and I strive<br/>hard to become a good Perl programmer by rectifying my mistakes day by day.<br/><br/>Hope it helps<br/><br/>Please provide your valuable feedback.<br/><br/>Sincerely,<br/>Shaji<br/><br/><br/>On Sun, Jul 20, 2014 at 3:03 AM, Harry Putnam &lt;reader@newsguy.com&gt; wrote:<br/><br/>&gt; First my usage:<br/>&gt; Single user machines, home lan and basic networking.<br/>&gt; My specific perl usage is as often just something I want to do as it<br/>&gt; is some system oriented scripting.<br/>&gt; ------- ------- ---=--- ------- -------<br/>&gt;<br/>&gt; I&#39;ve been a perl user for several yrs, but never really stay<br/>&gt; programming steadily or even semi-steadily for very long at a time. A<br/>&gt; month would be a long time historically for me. And would likely be<br/>&gt; followed by many months or even a year or more of no perl activity.<br/>&gt;<br/>&gt; Consequently, all the cool little tricks one kind of stumbles on or<br/>&gt; more importantly, the piles of things learned on this list over years<br/>&gt; of following and using it seem to evaporate between engagements.<br/>&gt;<br/>&gt; I find myself having to ask about things I know I&#39;ve learned before.<br/>&gt; And even things I&#39;ve made notes about... I often find I&#39;ve forgotten<br/>&gt; enough that my notes don&#39;t make any sense to me any more.<br/>&gt;<br/>&gt; OK, OK, so maybe I&#39;m a little dimmer or down right thick skulled<br/>&gt; compared to most. Or even suffering from early onset senility... (I am<br/>&gt; 70 next March after all.. and it would be a nice face saving<br/>&gt; excuse...).<br/>&gt;<br/>&gt; BUT: is there some remedy in the way of keeping brushed up by weekly<br/>&gt; perl work or the like?<br/>&gt;<br/>&gt; I mean an organized sort of structured kind of setup where you are<br/>&gt; expected to program something to a spec determined by someone<br/>&gt; knowledgeable.<br/>&gt;<br/>&gt; Err... I guess I&#39;m describing a perl class, but in my case it would<br/>&gt; have been the longest running `class&#39; in recorded history... by now<br/>&gt; some 15 to 20 yrs.<br/>&gt;<br/>&gt; Somewhat embarrassing to admit the time frame and then have to see and<br/>&gt; know the miserably low skill level I&#39;ve never broken out of or even<br/>&gt; maintained.<br/>&gt;<br/>&gt; So all and any ideas, suggestions etc would be well received on this end.<br/>&gt;<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/><br/>-- <br/>best,<br/>Shaji<br/>----------------------------------------------------------------------------------------------------------------------------------------------<br/>Your talent is God&#39;s gift to you. What you do with it is your gift back to<br/>God.<br/>----------------------------------------------------------------------------------------------------------------------------------------------<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124619.html Mon, 21 Jul 2014 14:02:53 +0000 Re: About staying brushed up on perl by Shawn H Corey On Mon, 21 Jul 2014 15:01:10 +0200<br/>mimosinnet@gmail.com wrote:<br/><br/>&gt; I have self-learned Perl about a couple of years ago and I am also<br/>&gt; having a similar use of Perl, so I often forget how I did things. I<br/>&gt; must also say that I am about to be 50 years old next December and I<br/>&gt; do not have any technical education as my degree is in psychology. I<br/>&gt; use http://perlweekly.com/ to see what is going on,<br/>&gt; http://perlmaven.com/ to remember how things are done and O&#39;Reilly if<br/>&gt; I need more in-depth understanding on a specific issue. Cheers!<br/><br/> Welcome to Perl. Here are some links you might find useful:<br/><br/> * official site &lt;http://www.perl.org/&gt;<br/> * beginners&#39; help &lt;http://learn.perl.org/faq/beginners.html&gt;<br/> * advance help &lt;http://perlmonks.org/&gt;<br/> * documentation &lt;http://perldoc.perl.org/&gt;<br/> * news &lt;http://perlsphere.net/&gt;<br/> * repository &lt;http://www.cpan.org/&gt;<br/> * blog &lt;http://blogs.perl.org/&gt;<br/> * regional groups &lt;http://www.pm.org/&gt;<br/> * videos &lt;http://perltv.org/&gt;<br/><br/><br/>-- <br/>Don&#39;t stop where the ink does.<br/> Shawn<br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124618.html Mon, 21 Jul 2014 13:34:58 +0000 Re: About staying brushed up on perl by mimosinnet I have self-learned Perl about a couple of years ago and I am also having a<br/>similar use of Perl, so I often forget how I did things. I must also say<br/>that I am about to be 50 years old next December and I do not have any<br/>technical education as my degree is in psychology. I use<br/>http://perlweekly.com/ to see what is going on, http://perlmaven.com/ to<br/>remember how things are done and O&#39;Reilly if I need more in-depth<br/>understanding on a specific issue. Cheers!<br/><br/><br/>2014-07-19 23:33 GMT+02:00 Harry Putnam &lt;reader@newsguy.com&gt;:<br/><br/>&gt; First my usage:<br/>&gt; Single user machines, home lan and basic networking.<br/>&gt; My specific perl usage is as often just something I want to do as it<br/>&gt; is some system oriented scripting.<br/>&gt; ------- ------- ---=--- ------- -------<br/>&gt;<br/>&gt; I&#39;ve been a perl user for several yrs, but never really stay<br/>&gt; programming steadily or even semi-steadily for very long at a time. A<br/>&gt; month would be a long time historically for me. And would likely be<br/>&gt; followed by many months or even a year or more of no perl activity.<br/>&gt;<br/>&gt; Consequently, all the cool little tricks one kind of stumbles on or<br/>&gt; more importantly, the piles of things learned on this list over years<br/>&gt; of following and using it seem to evaporate between engagements.<br/>&gt;<br/>&gt; I find myself having to ask about things I know I&#39;ve learned before.<br/>&gt; And even things I&#39;ve made notes about... I often find I&#39;ve forgotten<br/>&gt; enough that my notes don&#39;t make any sense to me any more.<br/>&gt;<br/>&gt; OK, OK, so maybe I&#39;m a little dimmer or down right thick skulled<br/>&gt; compared to most. Or even suffering from early onset senility... (I am<br/>&gt; 70 next March after all.. and it would be a nice face saving<br/>&gt; excuse...).<br/>&gt;<br/>&gt; BUT: is there some remedy in the way of keeping brushed up by weekly<br/>&gt; perl work or the like?<br/>&gt;<br/>&gt; I mean an organized sort of structured kind of setup where you are<br/>&gt; expected to program something to a spec determined by someone<br/>&gt; knowledgeable.<br/>&gt;<br/>&gt; Err... I guess I&#39;m describing a perl class, but in my case it would<br/>&gt; have been the longest running `class&#39; in recorded history... by now<br/>&gt; some 15 to 20 yrs.<br/>&gt;<br/>&gt; Somewhat embarrassing to admit the time frame and then have to see and<br/>&gt; know the miserably low skill level I&#39;ve never broken out of or even<br/>&gt; maintained.<br/>&gt;<br/>&gt; So all and any ideas, suggestions etc would be well received on this end.<br/>&gt;<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/07/msg124617.html Mon, 21 Jul 2014 13:01:22 +0000 Re: -e switch is not working on Window 7 and 8 by Purvee Vora Thanks Wolf.<br/>It is working now.<br/><br/>cheers,<br/>Purvee<br/>On Mon, Jul 21, 2014 at 11:07 AM, WFB &lt;wbiker@gmx.at&gt; wrote:<br/><br/>&gt; Hi Purvee,<br/>&gt;<br/>&gt; perl -e &#39;xyz&#39; works fine on Unix, however on Windows you must use &quot;<br/>&gt; instead.<br/>&gt;<br/>&gt; perl -e &quot;print qq(Hello \n)&quot;<br/>&gt;<br/>&gt; greetings,<br/>&gt; wolf<br/>&gt;<br/>&gt;<br/>&gt; On 21 July 2014 07:24, Purvee Vora &lt;purveevora@gmail.com&gt; wrote:<br/>&gt;<br/>&gt;&gt; Hi All,<br/>&gt;&gt;<br/>&gt;&gt; I am currently learing perl and was trying command line switches but It<br/>&gt;&gt; is not working in window7 and 8.<br/>&gt;&gt;<br/>&gt;&gt; Can any one help me out about this.<br/>&gt;&gt;<br/>&gt;&gt; I am really stuck here.<br/>&gt;&gt;<br/>&gt;&gt; I tried following example:<br/>&gt;&gt;<br/>&gt;&gt; perl -e &#39;print &quot;Hello \n&quot;;&#39;<br/>&gt;&gt;<br/>&gt;&gt; Commnad line shows blank response. I cannot see &quot;Hello&quot; world on CMD.<br/>&gt;&gt;<br/>&gt;&gt; Regards,<br/>&gt;&gt; Purvee<br/>&gt;&gt;<br/>&gt;<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124616.html Mon, 21 Jul 2014 08:10:28 +0000 Re: -e switch is not working on Window 7 and 8 by Shaji Kalidasan Dear Purvee,<br/><br/>Here is one way to do it<br/><br/>#Approach 1<br/><br/>[code]<br/>perl -e &quot;print qq{Hello\n}&quot;<br/>[/code]<br/><br/>[output]<br/>Hello<br/><br/>[/output]<br/><br/>Please note: qq stands for double quotes<br/><br/>#Approach 2<br/><br/>[code]<br/>perl -e &quot;print &#39;Hello&#39;&quot;<br/>[/code]<br/><br/>[output]<br/>Hello<br/>[/output]<br/><br/><br/><br/>On Mon, Jul 21, 2014 at 10:54 AM, Purvee Vora &lt;purveevora@gmail.com&gt; wrote:<br/><br/>&gt; Hi All,<br/>&gt;<br/>&gt; I am currently learing perl and was trying command line switches but It is<br/>&gt; not working in window7 and 8.<br/>&gt;<br/>&gt; Can any one help me out about this.<br/>&gt;<br/>&gt; I am really stuck here.<br/>&gt;<br/>&gt; I tried following example:<br/>&gt;<br/>&gt; perl -e &#39;print &quot;Hello \n&quot;;&#39;<br/>&gt;<br/>&gt; Commnad line shows blank response. I cannot see &quot;Hello&quot; world on CMD.<br/>&gt;<br/>&gt; Regards,<br/>&gt; Purvee<br/>&gt;<br/><br/><br/><br/>-- <br/>best,<br/>Shaji<br/>----------------------------------------------------------------------------------------------------------------------------------------------<br/>Your talent is God&#39;s gift to you. What you do with it is your gift back to<br/>God.<br/>----------------------------------------------------------------------------------------------------------------------------------------------<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124615.html Mon, 21 Jul 2014 05:40:56 +0000 Re: -e switch is not working on Window 7 and 8 by WFB Hi Purvee,<br/><br/>perl -e &#39;xyz&#39; works fine on Unix, however on Windows you must use &quot; instead.<br/><br/>perl -e &quot;print qq(Hello \n)&quot;<br/><br/>greetings,<br/>wolf<br/><br/><br/>On 21 July 2014 07:24, Purvee Vora &lt;purveevora@gmail.com&gt; wrote:<br/><br/>&gt; Hi All,<br/>&gt;<br/>&gt; I am currently learing perl and was trying command line switches but It is<br/>&gt; not working in window7 and 8.<br/>&gt;<br/>&gt; Can any one help me out about this.<br/>&gt;<br/>&gt; I am really stuck here.<br/>&gt;<br/>&gt; I tried following example:<br/>&gt;<br/>&gt; perl -e &#39;print &quot;Hello \n&quot;;&#39;<br/>&gt;<br/>&gt; Commnad line shows blank response. I cannot see &quot;Hello&quot; world on CMD.<br/>&gt;<br/>&gt; Regards,<br/>&gt; Purvee<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124614.html Mon, 21 Jul 2014 05:37:50 +0000 -e switch is not working on Window 7 and 8 by Purvee Vora Hi All,<br/><br/>I am currently learing perl and was trying command line switches but It is<br/>not working in window7 and 8.<br/><br/>Can any one help me out about this.<br/><br/>I am really stuck here.<br/><br/>I tried following example:<br/><br/>perl -e &#39;print &quot;Hello \n&quot;;&#39;<br/><br/>Commnad line shows blank response. I cannot see &quot;Hello&quot; world on CMD.<br/><br/>Regards,<br/>Purvee<br/><br/> http://www.nntp.perl.org/group/perl.beginners/2014/07/msg124613.html Mon, 21 Jul 2014 05:25:09 +0000