[32139] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3404 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 7 00:09:49 2011

Date: Mon, 6 Jun 2011 21:09:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 6 Jun 2011     Volume: 11 Number: 3404

Today's topics:
    Re: help!! greymausg@mail.com
    Re: help!! <jurgenex@hotmail.com>
    Re: help!! <jimsgibson@gmail.com>
    Re: help!! <sherm.pendley@gmail.com>
    Re: How to keep SQL statement preparation and executing <rweikusat@mssgmbh.com>
        How to setup when "Can't locate Date/Simple.pm in @INC" <moonhkt@gmail.com>
    Re: How to setup when "Can't locate Date/Simple.pm in @ <tadmc@seesig.invalid>
    Re: How to setup when "Can't locate Date/Simple.pm in @ <moonhkt@gmail.com>
        Installing Perl without man pages? <sherm.pendley@gmail.com>
        Mime::Lite, mark msg=important <dn.perl@gmail.com>
    Re: Mime::Lite, mark msg=important <tzz@lifelogs.com>
    Re: Mime::Lite, mark msg=important <sherm.pendley@gmail.com>
    Re: Module for parsing .authinfo? <tzz@lifelogs.com>
    Re: Module for parsing .authinfo? <uri@StemSystems.com>
    Re: Module for parsing .authinfo? <tzz@lifelogs.com>
    Re: Module for parsing .authinfo? <uri@StemSystems.com>
    Re: require statement <marc.girod@gmail.com>
    Re: require statement <bytebrothers.uk@gmail.com>
    Re: simple CGI server <tzz@lifelogs.com>
    Re: simple CGI server <peter@www.pjb.com.au>
    Re: simple CGI server <tzz@lifelogs.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 6 Jun 2011 18:45:02 GMT
From: greymausg@mail.com
Subject: Re: help!!
Message-Id: <slrniuq5qj.bb6.greymausg@gmaus.org>

On 2011-06-03, Ralph Malph <ralph@happydays.com> wrote:
> Is it ok if I ask a question about getting help?
> What will cause my script not to work?
> Why isn't anyone helping me? This forum seems to be mostly faqs and 
> guidelines.
> Do people answer questions here anymore?
>
> On 5/24/2011 3:16 AM, tadmc@seesig.invalid wrote:


Some hints;

Do not toppost (put your message at the top of a long
message ;

Ask politely, the people here wwill not chaarge you for advice.

read the messages for a while, to get the idea of what is customery
before asking.




-- 
greymaus
 .
  .
 ...


------------------------------

Date: Mon, 06 Jun 2011 13:29:23 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: help!!
Message-Id: <mudqu61fohm4hus07vnsco8shc74sq934l@4ax.com>

greymausg@mail.com wrote:
>On 2011-06-03, Ralph Malph <ralph@happydays.com> wrote:
>> Is it ok if I ask a question about getting help?

Most certainly.

>> What will cause my script not to work?

If you had posted you script (or better a minimal demo version that
still exposes the problem), including sample input, and if you had
described what you expected the script to do and what you observed the
script to do instead, then chances are pretty good that someone can
figure out where the problem is. Hint: it may not even be in your
script.

>> Why isn't anyone helping me? 

Probably because you didn't provide the most basic information that
would enable us to analyse your problem.

jue


------------------------------

Date: Mon, 06 Jun 2011 15:51:22 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: help!!
Message-Id: <060620111551221524%jimsgibson@gmail.com>

In article <slrniuq5qj.bb6.greymausg@gmaus.org>, <greymausg@mail.com>
wrote:

> On 2011-06-03, Ralph Malph <ralph@happydays.com> wrote:
> > Is it ok if I ask a question about getting help?
> > What will cause my script not to work?
> > Why isn't anyone helping me? This forum seems to be mostly faqs and 
> > guidelines.
> > Do people answer questions here anymore?
> >
> > On 5/24/2011 3:16 AM, tadmc@seesig.invalid wrote:
> 
> 
> Some hints;
> 
> Do not toppost (put your message at the top of a long
> message ;
> 
> Ask politely, the people here wwill not chaarge you for advice.
> 
> read the messages for a while, to get the idea of what is customery
> before asking.

You have responded to a known troll. It is best just to ignore it.

Thanks.

-- 
Jim Gibson


------------------------------

Date: Mon, 06 Jun 2011 19:12:15 -0400
From: Sherm Pendley <sherm.pendley@gmail.com>
Subject: Re: help!!
Message-Id: <m27h8yy2pc.fsf@sherm.shermpendley.com>

greymausg@mail.com writes:

> Do not toppost (put your message at the top of a long
> message ;
>
> Ask politely, the people here wwill not chaarge you for advice.
>
> read the messages for a while, to get the idea of what is customery
> before asking.

Good advice, but you're wasting your time - "Ralph" has a history here
which makes it pretty obvious that he isn't actually interested in
receiving any help.

sherm--


------------------------------

Date: Mon, 06 Jun 2011 15:13:05 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: How to keep SQL statement preparation and executing code together
Message-Id: <87tyc3vyj2.fsf@sapphire.mobileactivedefense.com>

Xho Jingleheimerschmidt <xhoster@gmail.com> writes:
> Rainer Weikusat wrote:
>>> I find that rather hard to believe.
>>
>> Facts don't care for your belief in them.
>
> Nor do they for yours.

The statement you deleted was

>> while the redundant local stuff
>> slows your processing down for nothing in return).

To which you replied as quoted above. Since any avoidable processing
on the computer the Perl script runs on needs time which could
otherwise be used for the non-avoidable stuff, the two lines I
re-inserted here state a fact.

> And since you have nothing but bluster and FUD to offer....

That you reply to my text with a judgeing summary statement instead of
addressing the points I made (and do so after omitting said points, so
that possible readers have a somewhat harder time to determine what
they were) amounts to an admission that you desire
to 'prove' me wrong is greater than the arguments you have at your
disposal for actually doing so. And by the way, 'FUD' refers to a
particular style of marketing products (by spreading 'fear,
uncertainty and doubt' about competing products, originally coined by
Gene Amdahl when trying to sell 'IBM compatible' mainframes in the
1970s).


------------------------------

Date: Mon, 6 Jun 2011 07:52:29 -0700 (PDT)
From: moonhkt <moonhkt@gmail.com>
Subject: How to setup when "Can't locate Date/Simple.pm in @INC"
Message-Id: <96a0e7a4-111b-4ec1-adfd-4b0ad76db29c@j25g2000vbr.googlegroups.com>

Hi All

AIX 5.3
My ID is root id. Just Normal user.

j=$( perl  <<-'EOF'
  use strict;
   use Date::Simple
  my ($count) ;

  $count=5;
  print "$count";
EOF
)

with below error, How to setup @INC
Can't locate Date/Simple.pm in @INC (@INC contains: /usr/opt/perl5/lib/
5.8.8/aix-thread-multi /usr/opt/perl5/l
ib/5.8.8 /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi /usr/opt/
perl5/lib/site_perl/5.8.8 /usr/opt/perl5
/lib/site_perl .) at - line 3.
BEGIN failed--compilation aborted at - line 3.


------------------------------

Date: Mon, 06 Jun 2011 10:44:10 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: How to setup when "Can't locate Date/Simple.pm in @INC"
Message-Id: <slrniupt27.mrk.tadmc@tadbox.sbcglobal.net>

moonhkt <moonhkt@gmail.com> wrote:

>    use Date::Simple


Statements in Perl end with a semicolon.


>   print "$count";

    perldoc -q vars

    What's wrong with always quoting "$vars"?

So that should be just:

    print $count;


> How to setup @INC


    perldoc -q INC

    How do I add a directory to my include path (@INC) at runtime?


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.


------------------------------

Date: Mon, 6 Jun 2011 17:58:44 -0700 (PDT)
From: moonhkt <moonhkt@gmail.com>
Subject: Re: How to setup when "Can't locate Date/Simple.pm in @INC"
Message-Id: <3581a4c2-94b0-4334-b864-e555efbcdbdf@u26g2000vby.googlegroups.com>

On Jun 6, 11:44=A0pm, Tad McClellan <ta...@seesig.invalid> wrote:
> moonhkt <moon...@gmail.com> wrote:
> > =A0 =A0use Date::Simple
>
> Statements in Perl end with a semicolon.
>
> > =A0 print "$count";
>
> =A0 =A0 perldoc -q vars
>
> =A0 =A0 What's wrong with always quoting "$vars"?
>
> So that should be just:
>
> =A0 =A0 print $count;
>
> > How to setup @INC
>
> =A0 =A0 perldoc -q INC
>
> =A0 =A0 How do I add a directory to my include path (@INC) at runtime?
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
> The above message is a Usenet post.
> I don't recall having given anyone permission to use it on a Web site.


Thank for your suggestion. Also, Do you know how to parameter
parameter to perl script with below format ?

My perl script updated.

XVAL=3D$1 ; export XVAL
j=3D$( perl  <<-'EOF'
  use strict;
  use POSIX qw( strftime );
  use Getopt::Std;
  my ($ymd,$i) ;
  $i=3D$ENV{'XVAL'};
  $ymd=3Dstrftime("%Y/%m/%d",localtime(time + $i *86400));
  print $ymd;
EOF
)



------------------------------

Date: Mon, 06 Jun 2011 22:58:30 -0400
From: Sherm Pendley <sherm.pendley@gmail.com>
Subject: Installing Perl without man pages?
Message-Id: <m2pqmqs5yh.fsf@sherm.shermpendley.com>

What's the secret sauce for installing Perl without man pages?

I've tried configuring with "-Dman1dir=' ' -Dman3dir=' '" and with
"-Uman1dir -Uman3dir", and both resulted in the man pages all being
dumped into my top-level install directory.

sherm--


------------------------------

Date: Mon, 6 Jun 2011 16:15:41 -0700 (PDT)
From: "dn.perl@gmail.com" <dn.perl@gmail.com>
Subject: Mime::Lite, mark msg=important
Message-Id: <fd21eaf5-3410-4f92-b3c7-0cbae7ae3b25@18g2000prd.googlegroups.com>


I want to send a message using Mime::Lite + sendmail. The message
would be read in Microsoft Outlook. I would like to mark it as
'important'. Outlook has an icon which lets me do that. But I would
like to send such an email using a perl script. So long as the
Microsoft Outlook mail-reader shows it as marked important, my goal is
met.

Please advise.


------------------------------

Date: Mon, 06 Jun 2011 20:04:55 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Mime::Lite, mark msg=important
Message-Id: <871uz6ladk.fsf@lifelogs.com>

On Mon, 6 Jun 2011 16:15:41 -0700 (PDT) "dn.perl@gmail.com" <dn.perl@gmail.com> wrote: 

dpc> I want to send a message using Mime::Lite + sendmail. The message
dpc> would be read in Microsoft Outlook. I would like to mark it as
dpc> 'important'. Outlook has an icon which lets me do that. But I would
dpc> like to send such an email using a perl script. So long as the
dpc> Microsoft Outlook mail-reader shows it as marked important, my goal is
dpc> met.

(I think you mean MIME::Lite above)

For the actual headers you need, see

http://stackoverflow.com/questions/6123381/how-to-send-mark-as-important-mail-using-rails

Basically you need "Importance: High", "X-Priority: 1",
and "X-MSMail-Priority: High" (the last one for older Outlooken).

It's trivial to add the necessary headers with the MIME::Lite module.

Ted


------------------------------

Date: Mon, 06 Jun 2011 23:00:00 -0400
From: Sherm Pendley <sherm.pendley@gmail.com>
Subject: Re: Mime::Lite, mark msg=important
Message-Id: <m2lixes5vz.fsf@sherm.shermpendley.com>

"dn.perl@gmail.com" <dn.perl@gmail.com> writes:

> I want to send a message using Mime::Lite + sendmail. The message
> would be read in Microsoft Outlook. I would like to mark it as
> 'important'. Outlook has an icon which lets me do that. But I would
> like to send such an email using a perl script. So long as the
> Microsoft Outlook mail-reader shows it as marked important, my goal is
> met.

Easiest thing to do is to first use Outlook to send yourself such an
email. When you receive it, look at its headers to see what Outlook
added.

sherm--


------------------------------

Date: Mon, 06 Jun 2011 08:29:06 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Module for parsing .authinfo?
Message-Id: <874o43nl5p.fsf@lifelogs.com>

On Sun, 05 Jun 2011 18:56:05 -0400 "Uri Guttman" <uri@StemSystems.com> wrote: 

#+begin_src perl
foreach my $line ( @auth_lines ) {

	$csv->parse( $line ) ;
	my %auth_parts = $csv->fields();

	$auth_info{ $auth_parts{machine} } = \%auth_parts ;
}
#+end_src

Thanks for the work, Uri.

Maybe the return should be an array if we're making this general.
There's no need to make 'machine' the authoritative key unless the user
asks for it (similar to the DBI distinction between getting return
values as a hash or as an array).  At least for Gnus-supported netrc
files that would be a nice feature.

Tim, if you're interested in putting this up on CPAN or submitting a
patch to Net::Netrc, go ahead; otherwise let me know and I'll do it.

Either way, I'd like to add support for the gpg: encrypted tokens I am
implementing for Emacs and Gnus.  Might as well start pushing them in
other languages.

Ted


------------------------------

Date: Mon, 06 Jun 2011 13:04:41 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: Module for parsing .authinfo?
Message-Id: <87pqmqnb6e.fsf@quad.sysarch.com>

>>>>> "TZ" == Ted Zlatanov <tzz@lifelogs.com> writes:

  TZ> Thanks for the work, Uri.

welcome. it was so much effort!

  TZ> Maybe the return should be an array if we're making this general.
  TZ> There's no need to make 'machine' the authoritative key unless the user
  TZ> asks for it (similar to the DBI distinction between getting return
  TZ> values as a hash or as an array).  At least for Gnus-supported netrc
  TZ> files that would be a nice feature.

do what you want with it. i just was showing how simple the code should
be. i just wanted to dumper out my .authinfo so i knew it worked.

  TZ> Tim, if you're interested in putting this up on CPAN or submitting a
  TZ> patch to Net::Netrc, go ahead; otherwise let me know and I'll do it.

fat chance he will do anything. with an attitude like that, he is not
likely to put something on cpan. i mean it would be actual work on his
part and we can't have him doing that!

  TZ> Either way, I'd like to add support for the gpg: encrypted tokens I am
  TZ> implementing for Emacs and Gnus.  Might as well start pushing them in
  TZ> other languages.

and it still needs continuation line support. that is about 4 more lines
of code (having solved it in several ways in my head). i ain't coding it
up.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Mon, 06 Jun 2011 19:56:13 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Module for parsing .authinfo?
Message-Id: <87aadulas2.fsf@lifelogs.com>

On Mon, 06 Jun 2011 13:04:41 -0400 "Uri Guttman" <uri@StemSystems.com> wrote: 

>>>>>> "TZ" == Ted Zlatanov <tzz@lifelogs.com> writes:

TZ> Tim, if you're interested in putting this up on CPAN or submitting a
TZ> patch to Net::Netrc, go ahead; otherwise let me know and I'll do it.

UG> fat chance he will do anything. with an attitude like that, he is not
UG> likely to put something on cpan. i mean it would be actual work on his
UG> part and we can't have him doing that!

You're overreacting and inflaming things further; I've dealt with Tim
and think your opinion if off.  How about we stick to the interesting
technical discussion?

TZ> Either way, I'd like to add support for the gpg: encrypted tokens I am
TZ> implementing for Emacs and Gnus.  Might as well start pushing them in
TZ> other languages.

UG> and it still needs continuation line support. that is about 4 more lines
UG> of code (having solved it in several ways in my head). i ain't coding it
UG> up.

It needs more to be a good module, but I can take care of the fine print
and edge cases, plus gpg: tokens as I mentioned.

So what are the chances of getting a Net::Netrc patch into the core?
Should I bother or should I just put it up as a standalone module on CPAN?

Ted


------------------------------

Date: Mon, 06 Jun 2011 23:08:00 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: Module for parsing .authinfo?
Message-Id: <874o42gwz3.fsf@quad.sysarch.com>

>>>>> "TZ" == Ted Zlatanov <tzz@lifelogs.com> writes:

  TZ> On Mon, 06 Jun 2011 13:04:41 -0400 "Uri Guttman" <uri@StemSystems.com> wrote: 
  >>>>>>> "TZ" == Ted Zlatanov <tzz@lifelogs.com> writes:

  TZ> Tim, if you're interested in putting this up on CPAN or submitting a
  TZ> patch to Net::Netrc, go ahead; otherwise let me know and I'll do it.

  UG> fat chance he will do anything. with an attitude like that, he is not
  UG> likely to put something on cpan. i mean it would be actual work on his
  UG> part and we can't have him doing that!

  TZ> You're overreacting and inflaming things further; I've dealt with Tim
  TZ> and think your opinion if off.  How about we stick to the interesting
  TZ> technical discussion?

did you see his reply to my original answer? and has he replied to my
working code in 10 lines? that took 15 minutes? not an overreaction at all.

  UG> and it still needs continuation line support. that is about 4 more lines
  UG> of code (having solved it in several ways in my head). i ain't coding it
  UG> up.

  TZ> It needs more to be a good module, but I can take care of the fine print
  TZ> and edge cases, plus gpg: tokens as I mentioned.

i don't care about this module. i just wanted to show tim how wrong he
was about how simple this was.

  TZ> So what are the chances of getting a Net::Netrc patch into the core?
  TZ> Should I bother or should I just put it up as a standalone module on CPAN?

not my concern either. i don't parse those modules. but hardwiring a
filename for a parser is a stupid api. default it sure. also ::netrc
seems to have some login features as it is a Net:: module. authinfo
could have those but to what purpose? i use mine for pop and emacs
sending mail. qmail has its own file for that info.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Mon, 6 Jun 2011 06:27:44 -0700 (PDT)
From: Marc Girod <marc.girod@gmail.com>
Subject: Re: require statement
Message-Id: <6fb759a7-6e06-4538-82b1-309636008c9d@m10g2000yqd.googlegroups.com>

On Jun 6, 1:56=A0pm, Rainer Weikusat <rweiku...@mssgmbh.com> wrote:

> The two options which suggest themselves would be

A third one: give it on the command line.
A fourth: grab it from somewhere in a BEGIN block.
A fifth: guess it (in a BEGIN block)...

Marc


------------------------------

Date: Mon, 6 Jun 2011 08:04:24 -0700 (PDT)
From: Keith <bytebrothers.uk@gmail.com>
Subject: Re: require statement
Message-Id: <d84ccb45-1c46-40b6-b256-54e262776e50@v11g2000prk.googlegroups.com>

On Jun 6, 2:27=A0pm, Marc Girod <marc.gi...@gmail.com> wrote:
> On Jun 6, 1:56=A0pm, Rainer Weikusat <rweiku...@mssgmbh.com> wrote:
>
> > The two options which suggest themselves would be
>
> A third one: give it on the command line.
> A fourth: grab it from somewhere in a BEGIN block.
> A fifth: guess it (in a BEGIN block)...

Sixth?  Something like:

use lib $ENV{MY_LIB_BASE_PATH}.'some/sub/folder';
require admin;


------------------------------

Date: Mon, 06 Jun 2011 08:30:55 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: simple CGI server
Message-Id: <87zklvm6i8.fsf@lifelogs.com>

On Fri, 03 Jun 2011 18:33:32 -0700 Xho Jingleheimerschmidt <xhoster@gmail.com> wrote: 

>>> use Something::CGI;
>>> Something::CGI->run_loop(
>>> {listen_on => 8080, dir => "/path/to/servers/cgi-bin"}
>>> );
>>> __END__
>> 
>> You'll need a little bit more code than that, though. 

XJ> Yeah, unfortunately I found it easier to just install apache than to
XJ> figure out how to come up with that extra code.

Try w3m.  It will *run* CGI scripts from within the web browser.  It's
the only web browser with that feature AFAIK.

Ted


------------------------------

Date: 06 Jun 2011 23:17:19 GMT
From: Peter Billam <peter@www.pjb.com.au>
Subject: Re: simple CGI server
Message-Id: <slrniuqnvv.21c.peter@box8.pjb.com.au>

On 2011-06-06, Ted Zlatanov <tzz@lifelogs.com> wrote:
> Try w3m.  It will *run* CGI scripts from within the web browser.
> It's the only web browser with that feature AFAIK.

Not quite: lynx will also do it, look for  SIMULATED CGI SUPPORT
and  lynxcgi ...

Regards,  Peter

-- 
Peter Billam    www.pjb.com.au    www.pjb.com.au/comp/contact.html


------------------------------

Date: Mon, 06 Jun 2011 19:57:08 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: simple CGI server
Message-Id: <8762oilaqj.fsf@lifelogs.com>

On 06 Jun 2011 23:17:19 GMT Peter Billam <peter@www.pjb.com.au> wrote: 

PB> On 2011-06-06, Ted Zlatanov <tzz@lifelogs.com> wrote:
>> Try w3m.  It will *run* CGI scripts from within the web browser.
>> It's the only web browser with that feature AFAIK.

PB> Not quite: lynx will also do it, look for  SIMULATED CGI SUPPORT
PB> and  lynxcgi ...

Cool, I didn't know that.

Let 6 months pass and I'll forget it again ;)

Ted


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3404
***************************************


home help back first fref pref prev next nref lref last post