[29682] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 926 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 11 14:10:03 2007

Date: Thu, 11 Oct 2007 11:09:11 -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           Thu, 11 Oct 2007     Volume: 11 Number: 926

Today's topics:
        AS400 v4r2 Perl <felipevaldez@gmail.com>
    Re: Converting hex to decimal when printed? <nobull67@gmail.com>
    Re: Converting hex to decimal when printed? <mritty@gmail.com>
    Re: Does Perl micro-optimize? <rihad@mail.ru>
    Re: Does Perl micro-optimize? <tadmc@seesig.invalid>
    Re: Does Perl micro-optimize? <ben@morrow.me.uk>
    Re: Does Perl micro-optimize? <rihad@mail.ru>
    Re: Does Perl micro-optimize? <wahab-mail@gmx.de>
    Re: Does Perl micro-optimize? <jgibson@mail.arc.nasa.gov>
    Re: Help with regular expression please? <nobull67@gmail.com>
    Re: https access - NET::SSL or Crypt::SSLeay ?  <glex_no-spam@qwest-spam-no.invalid>
        new CPAN modules on Thu Oct 11 2007 (Randal Schwartz)
        Perl 5.8 and MD5 <jruffino@gailborden.info>
    Re: Perl 5.8 and MD5 <mritty@gmail.com>
    Re: Perl 5.8 and MD5 <elvis-85363@notatla.org.uk>
    Re: Perl 5.8 and MD5 <jruffino@gailborden.info>
    Re: Perl 5.8 and MD5 <nobull67@gmail.com>
    Re: Perl 5.8 and MD5 <glex_no-spam@qwest-spam-no.invalid>
    Re: required perl programmer <zaxfuuq@invalid.net>
    Re: required perl programmer <dha@panix.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 11 Oct 2007 18:04:24 -0000
From:  fel <felipevaldez@gmail.com>
Subject: AS400 v4r2 Perl
Message-Id: <1192125864.498492.111910@o3g2000hsb.googlegroups.com>

Hello Everybody,

on this page:

http://www.cpan.org/ports/os400/old/README.AS400

I find that I can use Perl in the AS/400, however, this particular
perl SAVF was stored in a newer version, which I cannot use (because I
use V4r2 ).

you guys wouldn't happen to have an old as400 perl port for the v4r2,
or access to a recent AS400 where this could be re-generated?

also, if I was to do so, would it work, or would it have as a
requirement V5R1+ ??

thanks in advance.


please post your responses to:
(X-Posted to: comp.lang.perl.misc,comp.sys.ibm.as400.misc)



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

Date: Thu, 11 Oct 2007 17:29:55 -0000
From:  Brian McCauley <nobull67@gmail.com>
Subject: Re: Converting hex to decimal when printed?
Message-Id: <1192123795.794391.317190@22g2000hsm.googlegroups.com>

On Oct 10, 9:10 pm, faren...@gmail.com wrote:

> I am reading in 2-digit hex values from a file and would like to
> output them as decimals.  Through online surfing, it seems like the
> easiest way to do this is to use printf.

No, there's no need to use printf to convert a number into a string
containing the decimal representation of the number.  In Perl simply
using a number in a string context will do this implicitly. So if I
try to print, or perform string concatenation on the number thirteen
it is implicitly converted to the string '13' first.

>  However, when I played
> around with printf, it seems like all hex values need to have 0x in
> front to make it work.

I suspect you are confusing code and data. In Perl program source code
I can represent the number thirteen as 13 or 1_3 or 0xd or 015 or
0b1101.

>  So I tried using variables to essentially
> concatenate 0x to my 2-digit hex values--but they all print as 0's!

When you use a string value in a numeric context (like in arithmetic
expression)  the rules are different. Anything at the start of the
string that looks like it may be a decimal (and only decimal) number
will be interpreted as such. So '13'+0 will be thirteen, '1_3'+0 will
be one, '0xd'+0 will be zero and '015'+0 will be fifteen.

> I also tried the built- in hex() function,

Yes, hex('d') or hex('0xd') would both return thirteen. And if you
print the value of an expression that returned thirteen it will print
as the string '13'.

> but it has the same problem.

Without seeing your code I can't guess why



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

Date: Thu, 11 Oct 2007 10:39:32 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: Converting hex to decimal when printed?
Message-Id: <1192124372.085318.150420@v3g2000hsg.googlegroups.com>

On Oct 10, 4:10 pm, faren...@gmail.com wrote:
> Hi, ok, trying this again, since my first post seems to be non-
> existent...
>
> I am reading in 2-digit hex values from a file and would like to
> output them as decimals.  Through online surfing, it seems like the
> easiest way to do this is to use printf.  However, when I played
> around with printf, it seems like all hex values need to have 0x in
> front to make it work.  So I tried using variables to essentially
> concatenate 0x to my 2-digit hex values--but they all print as 0's!
> My script is below:
>
> print "Enter filename to parse: ";
> chomp($filename = <>);
> $FilePath = "$filename";
> sysopen(HANDLE, $FilePath, O_RDONLY) or die "Cannot open file";
> @events = <HANDLE>;
> close(HANDLE);
> $Outfile = "out_$filename";
> sysopen(OHANDLE, $Outfile, O_RDWR|O_CREAT, 0755) or die "Cannot create
> file";
> foreach $events (@events)
> {
>  while($events =~ /(\s.*?\s)/g)
>  {
> # hex data fields
>   $tmp = $1;
>   $tmp =~ s/^\s+//;
>   $tmp =~ s/\s+$//;
>   $hexval = "0x$tmp";
>   printf OHANDLE "$hexval=>%d,", $hexval;
>   printf "$hexval=>%d,", $hexval;

$hexval is a string.  Perl has no way of knowing that that string
happens to contain a human being's representation of a hexadecimal
number.  When you say to use the %d format specifier, Perl knows you
want to convert that string to a number.  And it does this by reading
the string from left to right, stopping at the first character that
makes this string not a valid decimal number.  In this case, that's
the "x" you appended.  So this string converts to the number 0.

> I also tried the built-in hex() function, but it has the same
> problem.

No it doesn't.  hex() is the correct way to solve this problem.  If
you aren't getting correct results using it, you're doing something
wrong.  Unfortunately, you've only shown your code for the incorrect
way to solve the problem, and not for the correct way.  So there's no
way to show you what you've done wrong.  But here's your proof that
hex() works correctly:

$ perl -le'
for my $hexval (qw/EB 70 07 8A 51 C5/) {
  my $decval = hex($hexval);
  print "$hexval => $decval";
}
'
EB => 235
70 => 112
07 => 7
8A => 138
51 => 81
C5 => 197


Paul Lalli



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

Date: Wed, 10 Oct 2007 22:46:07 -0700
From:  rihad <rihad@mail.ru>
Subject: Re: Does Perl micro-optimize?
Message-Id: <1192081567.360082.178200@o3g2000hsb.googlegroups.com>

On Oct 10, 10:41 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth rihad <ri...@mail.ru>:
>     my $tmp = $hash{foo};
>
> can be slower than redoing the lookup, notably if $hash{foo} contains a
> long string that must be copied.

Why would Perl want to copy the value? Doesn't it do copy-on-write or
similar?



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

Date: Thu, 11 Oct 2007 11:06:01 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Does Perl micro-optimize?
Message-Id: <slrnfgs0r5.p09.tadmc@tadmc30.sbcglobal.net>

rihad <rihad@mail.ru> wrote:
> On Oct 10, 10:41 pm, Ben Morrow <b...@morrow.me.uk> wrote:
>> Quoth rihad <ri...@mail.ru>:
>>     my $tmp = $hash{foo};
>>
>> can be slower than redoing the lookup, notably if $hash{foo} contains a
>> long string that must be copied.
>
> Why would Perl want to copy the value? 


Because you told it to, via an assignment operator.


> Doesn't it do copy-on-write or
> similar?


The code above is doing a write (to the $tmp variable).


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Thu, 11 Oct 2007 13:43:24 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Does Perl micro-optimize?
Message-Id: <cci1u4-h2b2.ln1@osiris.mauzo.dyndns.org>


Quoth Tad McClellan <tadmc@seesig.invalid>:
> rihad <rihad@mail.ru> wrote:
> > On Oct 10, 10:41 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> >> Quoth rihad <ri...@mail.ru>:
> >>     my $tmp = $hash{foo};
> >>
> >> can be slower than redoing the lookup, notably if $hash{foo} contains a
> >> long string that must be copied.
> >
> > Why would Perl want to copy the value? 
> 
> Because you told it to, via an assignment operator.
> 
> > Doesn't it do copy-on-write or
> > similar?
> 
> The code above is doing a write (to the $tmp variable).

There is no good reason why perl couldn't copy-on-write the scalar: that
is, make a new SV that points at the same string buffer until one of
them is modified. There is some support for this in 5.9.x, but I don't
think it's ready to be used yet (?).

Ben



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

Date: Thu, 11 Oct 2007 06:46:27 -0700
From:  rihad <rihad@mail.ru>
Subject: Re: Does Perl micro-optimize?
Message-Id: <1192110387.073828.300910@57g2000hsv.googlegroups.com>

On Oct 11, 5:43 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> There is some support for this in 5.9.x, but I don't
> think it's ready to be used yet (?).
>

Noo, you've got to be kidding... At least subroutine arguments are
always passed by reference in Perl (which is good for speed, but bad
if you unintentionally modify them).

On a side note, and I won't be the first one to say this: Perl is
difficult. Too many special cases. Or maybe I have this impression
because Programming Perl by Larry Wall is very hard reading.



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

Date: Thu, 11 Oct 2007 16:02:55 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: Does Perl micro-optimize?
Message-Id: <felaqv$5di$1@mlucom4.urz.uni-halle.de>

rihad wrote:
> On Oct 11, 5:43 pm, Ben Morrow <b...@morrow.me.uk> wrote:
>> There is some support for this in 5.9.x, but I don't
>> think it's ready to be used yet (?).
> 
> Noo, you've got to be kidding... At least subroutine arguments are
> always passed by reference in Perl (which is good for speed, but bad
> if you unintentionally modify them).

In perl, only SV's (pointers to scalar values) or RV's (pointers
to those SV's, to Arrays, Hashes or whatever) are passed into
subroutines. There are "idiomatic expressions" for taking the
value they point to out into (copies) variables,
like:    my ($var1, $var2) = @_

> On a side note, and I won't be the first one to say this: Perl is
> difficult. Too many special cases. Or maybe I have this impression
> because Programming Perl by Larry Wall is very hard reading.

Thats true in my opinion, The "LLama Book"
(http://www.oreilly.com/catalog/lperl3/) is
much better for you if you jump into Perl
from somewhere else. The "Camel Book",
(http://www.oreilly.com/catalog/pperl3/index.html)
which is the book you mentioned, will be most
valuable if you are at least somehow "intermediate".

Regards

M.


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

Date: Thu, 11 Oct 2007 09:22:28 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Does Perl micro-optimize?
Message-Id: <111020070922287537%jgibson@mail.arc.nasa.gov>

In article <1192110387.073828.300910@57g2000hsv.googlegroups.com>,
rihad <rihad@mail.ru> wrote:

> On Oct 11, 5:43 pm, Ben Morrow <b...@morrow.me.uk> wrote:
> > There is some support for this in 5.9.x, but I don't
> > think it's ready to be used yet (?).
> >
> 
> Noo, you've got to be kidding... At least subroutine arguments are
> always passed by reference in Perl (which is good for speed, but bad
> if you unintentionally modify them).

Perl programmers gladly give up microseconds of execution time lost in
exchange for weeks of programmer time gained. If you need to worry
about the difference in execution time between copy-immediate and
copy-on-write, you shouldn't be using Perl.

> 
> On a side note, and I won't be the first one to say this: Perl is
> difficult. Too many special cases. Or maybe I have this impression
> because Programming Perl by Larry Wall is very hard reading.

If you want to see difficult, try performing complicated text
processing or using associative arrays in C++ or Java.

-- 
Jim Gibson

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------        
                http://www.usenet.com


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

Date: Thu, 11 Oct 2007 17:04:41 -0000
From:  Brian McCauley <nobull67@gmail.com>
Subject: Re: Help with regular expression please?
Message-Id: <1192122281.924470.90140@g4g2000hsf.googlegroups.com>

On Oct 10, 9:17 pm, "Billy N. Patton" <b-pat...@ti.com> wrote:

> # n = number
>
> # a = alpha char
>
> # + is one or more
>
> # ? one or more may or may not be there
>

You appear to be saying you are inventing your own simple regex
grammar

So the translation from your grammar to Perl's

my %translate_pattern_token = (
  'n'        =>     '\d'
  'a'        =>     '[[:alpha:]]'
  '+'        =>     '+'
  '?'        =>     '*'
);

So if a $rule is a pattern in your notation you could convert it to a
Perl regex thus...

my $regex = join '', map { $translate_pattern_token{$_} } split //,
$rule;

# E&OE

> # the rule names are built

OK now you've lost me. What did you mean by that?



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

Date: Thu, 11 Oct 2007 12:12:38 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: https access - NET::SSL or Crypt::SSLeay ? 
Message-Id: <470e5986$0$494$815e3792@news.qwest.net>

still me wrote:
> On Wed, 10 Oct 2007 20:34:38 GMT, still me <wheeledBob@yahoo.com>
> wrote:
> 
>> I need to pull a web page with Perl and echo it back. I am familiar
>> with crude LWP use (crude 'cause I'm a newbie). I understand that to
>> pull from an https server I will need NET::SSL or Crypt::SSLeay.
>>
>> Will NET::SSL do the job? I have a feeling that it will be easier to
>> get my host to install that, although I have asked for both. 
>>
>> Also, could someone post a simple example of pulling a page with it? I
>> don't need password access & such, just a very simple pull of a page
>>from an https server that I will echo back to the calling browser. 
> 
> Following up... I have found that Crypt::SSLeay is already installed.
> NET::SSL is not there... waiting for my host to get back to me. 
> 
> If there is a sample around of Crypt::SSLeay with a post operation
> that would help. 


If you can 'pull a page' for a non-SSL URL, you can 'pull a page'
for a SSL URL, if Crypt::SSLeay is installed. The only
difference in the script is 'https' vs 'http'.  You don't use
Crypt::SSLeay directly, LWP::* handles that for you.

To see how to 'pull a page', first try the documentation:

perldoc lwpcook
perldoc LWP::UserAgent

Or you could simply use the lwp-download script that might have
been installed as part of LWP.  You could also use your favorite
search engine and find many pages on the Internet, instead
of waiting for someone to respond in the newsgroup.


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

Date: Thu, 11 Oct 2007 04:42:17 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu Oct 11 2007
Message-Id: <JpqD2H.948@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Acme-Lambda-0.03
http://search.cpan.org/~nelhage/Acme-Lambda-0.03/
Perl with lambdas! 
----
Alien-CodePress-1.02
http://search.cpan.org/~asksh/Alien-CodePress-1.02/
Installing and finding CodePress. 
----
App-Cmd-0.010
http://search.cpan.org/~rjbs/App-Cmd-0.010/
write command line apps with less suffering 
----
Bot-Net-0.0.2
http://search.cpan.org/~hanenkamp/Bot-Net-0.0.2/
run your very own IRC bot net 
----
CPAN-Reporter-1.00
http://search.cpan.org/~dagolden/CPAN-Reporter-1.00/
Adds CPAN Testers reporting to CPAN.pm 
----
CPANPLUS-0.83_02
http://search.cpan.org/~kane/CPANPLUS-0.83_02/
API & CLI access to the CPAN mirrors 
----
Catalyst-Plugin-PickComponents-0.01
http://search.cpan.org/~fayland/Catalyst-Plugin-PickComponents-0.01/
Pick up the components for Catalyst. 
----
Continuity-0.95
http://search.cpan.org/~awwaiid/Continuity-0.95/
Abstract away statelessness of HTTP using continuations, for stateful Web applications 
----
Coro-4.1
http://search.cpan.org/~mlehmann/Coro-4.1/
coroutine process abstraction 
----
Coro-4.11
http://search.cpan.org/~mlehmann/Coro-4.11/
coroutine process abstraction 
----
Crypt-Elijah-0.08
http://search.cpan.org/~bomb/Crypt-Elijah-0.08/
cipher module 
----
Data-Remember-0.05
http://search.cpan.org/~hanenkamp/Data-Remember-0.05/
remember complex information without giving yourself a headache 
----
Email-Outlook-Message-0.902
http://search.cpan.org/~mvz/Email-Outlook-Message-0.902/
Read Outlook .msg files 
----
GoferTransport-http-1.013
http://search.cpan.org/~timb/GoferTransport-http-1.013/
----
GoferTransport-http-1.014
http://search.cpan.org/~timb/GoferTransport-http-1.014/
----
Gungho-0.08010
http://search.cpan.org/~dmaki/Gungho-0.08010/
Yet Another High Performance Web Crawler Framework 
----
Gungho-0.08011
http://search.cpan.org/~dmaki/Gungho-0.08011/
Yet Another High Performance Web Crawler Framework 
----
Hash-Dirty-0.021
http://search.cpan.org/~rkrimen/Hash-Dirty-0.021/
Keep track of whether a hash is dirty or not 
----
IO-Socket-SSL-1.11
http://search.cpan.org/~sullr/IO-Socket-SSL-1.11/
Nearly transparent SSL encapsulation for IO::Socket::INET. 
----
IWL-0.51
http://search.cpan.org/~viktork/IWL-0.51/
A widget library for the web 
----
Language-MuldisD-0.9.0
http://search.cpan.org/~duncand/Language-MuldisD-0.9.0/
Formal spec of Muldis D relational DBMS lang 
----
Moose-Tiny-0.0.1
http://search.cpan.org/~perigrin/Moose-Tiny-0.0.1/
Why Should Object::Tiny get all the Fun 
----
MooseX-Storage-0.08
http://search.cpan.org/~perigrin/MooseX-Storage-0.08/
An serialization framework for Moose classes 
----
MySpam-0.07
http://search.cpan.org/~mlawren/MySpam-0.07/
Database operations for the MySpam application 
----
Net-IPTrie-v0.2
http://search.cpan.org/~cvicente/Net-IPTrie-v0.2/
Perl module for building IPv4 and IPv6 address space hierarchies fast 
----
Net-TiVo-0.08
http://search.cpan.org/~boumenot/Net-TiVo-0.08/
Perl interface to TiVo. 
----
Net-Whois-Raw-1.33
http://search.cpan.org/~despair/Net-Whois-Raw-1.33/
Get Whois information for domains 
----
POE-Component-SNMP-Session-0.08
http://search.cpan.org/~rdb/POE-Component-SNMP-Session-0.08/
Wrap Net-SNMP's SNMP::Session in POE 
----
POE-Declarative-0.006
http://search.cpan.org/~hanenkamp/POE-Declarative-0.006/
write POE applications without the mess 
----
PPI-1.199_06
http://search.cpan.org/~adamk/PPI-1.199_06/
Parse, Analyze and Manipulate Perl (without perl) 
----
PerlPoint-Package-0.452
http://search.cpan.org/~jstenzel/PerlPoint-Package-0.452/
----
SQL-DB-0.07
http://search.cpan.org/~mlawren/SQL-DB-0.07/
Perl interface to SQL Databases 
----
SQL-DB-0.08
http://search.cpan.org/~mlawren/SQL-DB-0.08/
Perl interface to SQL Databases 
----
Socialtext-Resting-0.23
http://search.cpan.org/~lukec/Socialtext-Resting-0.23/
module for accessing Socialtext REST APIs 
----
String-Smart-0.1
http://search.cpan.org/~andya/String-Smart-0.1/
Strings that know how to escape themselves. 
----
String-Smart-0.2
http://search.cpan.org/~andya/String-Smart-0.2/
Strings that know how to escape themselves. 
----
Text-WikiCreole-0.04
http://search.cpan.org/~jburnett/Text-WikiCreole-0.04/
Convert Wiki Creole 1.0 markup to XHTML 
----
WebService-Google-Reader-0.02
http://search.cpan.org/~gray/WebService-Google-Reader-0.02/
Perl interface to Google Reader 
----
XML-API-0.16
http://search.cpan.org/~mlawren/XML-API-0.16/
Perl extension for writing XML 
----
XML-API-0.17
http://search.cpan.org/~mlawren/XML-API-0.17/
Perl extension for writing XML 
----
XML-MyXML-0.0986
http://search.cpan.org/~karjala/XML-MyXML-0.0986/
A simple-to-use XML module, for parsing and creating XML documents 
----
XML-RSS-Headline-PerlMonks-0.2
http://search.cpan.org/~donshank/XML-RSS-Headline-PerlMonks-0.2/
Subclass of XML::RSS::Headline for reading RSS feed from perlmonks.org 
----
lambda-v0.0.1
http://search.cpan.org/~ewilhelm/lambda-v0.0.1/
a shortcut for sub {...} 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Thu, 11 Oct 2007 10:13:00 -0700
From:  Joe <jruffino@gailborden.info>
Subject: Perl 5.8 and MD5
Message-Id: <1192122780.201338.300140@k79g2000hse.googlegroups.com>

I have been having trouble running some of my Perl scripts that use
Perl 5.6 using a Win 2000 server on 5.8a Win 2003 Server.  It took
quite awhile, but I am 99.999999% sure I figured out it is the <b>MD5</
b> module.

Every time I remark it out, my scrfipt works. But, the script was
written to use MD5. I use the following line to call it:

<b><code>use Digest::MD5 qw(md5_hex);</code></b>

Is there any advice you can give, like, how to see what modules are
installed, to be sure it is?

Any help would be appreciated.



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

Date: Thu, 11 Oct 2007 10:22:11 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192123331.448924.36180@r29g2000hsg.googlegroups.com>

On Oct 11, 1:13 pm, Joe <jruff...@gailborden.info> wrote:
> I have been having trouble running some of my Perl scripts that use
> Perl 5.6 using a Win 2000 server on 5.8a Win 2003 Server.  It took
> quite awhile, but I am 99.999999% sure I figured out it is the <b>MD5</
> b> module.
>
> Every time I remark it out, my scrfipt works. But, the script was
> written to use MD5. I use the following line to call it:
>
> <b><code>use Digest::MD5 qw(md5_hex);</code></b>

This is a text only newsgroup.  Why are you posting this fragment in
HTML?

> Is there any advice you can give, like, how to see what modules are
> installed, to be sure it is?

$ perldoc -q installed
Found in /opt2/Perl5_8_4/lib/perl5/5.8.4/pod/perlfaq3.pod
     How do I find which modules are installed on my system?


Paul Lalli



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

Date: 11 Oct 2007 17:22:37 GMT
From: all mail refused <elvis-85363@notatla.org.uk>
Subject: Re: Perl 5.8 and MD5
Message-Id: <slrnfgsm97.kl6.elvis-85363@notatla.org.uk>

On 2007-10-11, Joe <jruffino@gailborden.info> wrote:

> Every time I remark it out, my scrfipt works. But, the script was
> written to use MD5. I use the following line to call it:
>
><b><code>use Digest::MD5 qw(md5_hex);</code></b>
>
> Is there any advice you can give, like, how to see what modules are
> installed, to be sure it is?

The perl docs show how to use eval() when testing a module.

    eval "use Digest::MD5 qw(md5_hex)";
    if ($@) {
      # ouch - better do something else...
    }

-- 
Elvis Notargiacomo  master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/


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

Date: Thu, 11 Oct 2007 10:33:51 -0700
From:  Joe <jruffino@gailborden.info>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192124031.841345.95910@r29g2000hsg.googlegroups.com>


>     eval "use Digest::MD5 qw(md5_hex)";
>     if ($@) {
>       # ouch - better do something else...
>     }
>
> --
> Elvis Notargiacomo  master AT barefaced DOT cheekhttp://www.notatla.org.uk/goen/

Sorry, about html code, wasn't sure if it would work, now I know it
doesn't.

Anyway, using eval, gave me an error of:

Content-type: text/html

'C:\Inetpub\wwwroot\cgi-bin\TestMD5.pl' script produced no output

I also did  print "# ouch - better do something else... " in the if.

Does that mean the module is bad?



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

Date: Thu, 11 Oct 2007 17:59:49 -0000
From:  Brian McCauley <nobull67@gmail.com>
Subject: Re: Perl 5.8 and MD5
Message-Id: <1192125589.413736.211220@k79g2000hse.googlegroups.com>

On Oct 11, 6:33 pm, Joe <jruff...@gailborden.info> wrote:
> >     eval "use Digest::MD5 qw(md5_hex)";
> >     if ($@) {
> >       # ouch - better do something else...
> >     }
>
> > --
> > Elvis Notargiacomo  master AT barefaced DOT cheekhttp://www.notatla.org.uk/goen/
>
> Sorry, about html code, wasn't sure if it would work, now I know it
> doesn't.
>
> Anyway, using eval, gave me an error of:
>
> Content-type: text/html
>
> 'C:\Inetpub\wwwroot\cgi-bin\TestMD5.pl' script produced no output
>
> I also did  print "# ouch - better do something else... " in the if.
>
> Does that mean the module is bad?

No, it looks like you are bad.

You are bad for not telling us what you are really doing.

That error looks like something a web server program might say. I'd
guess it might be Microsoft IIS.

There was no web server mentioned in your original question.

Going back to your original question when you "have been having
trouble running" some of your Perl scripts could you say how that
trouble was manifest? In particular what errors were printed, logged
or whatever.

BTW: do you have any reason to believe Digest::MD5 is installed?



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

Date: Thu, 11 Oct 2007 13:05:18 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Perl 5.8 and MD5
Message-Id: <470e65df$0$497$815e3792@news.qwest.net>

Joe wrote:
>>     eval "use Digest::MD5 qw(md5_hex)";
>>     if ($@) {
>>       # ouch - better do something else...
>>     }
>>
>> --

> 
> Sorry, about html code, wasn't sure if it would work, now I know it
> doesn't.
> 
> Anyway, using eval, gave me an error of:
> 
> Content-type: text/html

What?  The example code you provided doesn't have anything
that would produce that line.  If that line is displayed
in your browser, your Web server isn't configured correctly.

> 
> 'C:\Inetpub\wwwroot\cgi-bin\TestMD5.pl' script produced no output
> 
> I also did  print "# ouch - better do something else... " in the if.
> 
> Does that mean the module is bad?

No, otherwise you might have seen "# ouch - better do something else".

Why not read the documentation to see what eval actually does, instead
of blindly typing it in?

perldoc -f eval

Looks like your server isn't set up to run CGI correctly or something
is wrong with your script.  Either post a short and complete example,
or work with your Web server's administrator to set it up correctly.



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

Date: Wed, 10 Oct 2007 19:19:37 -0700
From: "Wade Ward" <zaxfuuq@invalid.net>
Subject: Re: required perl programmer
Message-Id: <5sKdnRTnZ4W855DanZ2dnUVZ_gadnZ2d@comcast.com>



"Tad McClellan" <tadmc@seesig.invalid> wrote in message 
news:slrnfgqshv.5s6.tadmc@tadmc30.sbcglobal.net...

> Job postings are off-topic in this newsgroup.
>
> Postings from recruiters, rather than from employers, is
> outright reviled here.
>
> Get thee to http://jobs.perl.org instead.
>
>
>
> (Good Perl programmers are hard to come by in the Metroplex,
> my employer has been looking for some more for a while...
Which metroplex?  I corrected Dan Pop's usage of three periods in c.l.c. 
once.  I told him that at the end of the sentence, it has four periods, but 
he responded to tell me that that is the regular 3 periods of an ellipsis 
plus the period as another part of speech.  He made the original error, but 
I somehow made a bigger one by not correcting properly.  Tja.
-- 
wade ward
"Nicht verzagen, Bruder Grinde fragen." 




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

Date: Thu, 11 Oct 2007 18:05:04 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: required perl programmer
Message-Id: <slrnfgspeg.a0e.dha@panix2.panix.com>

On 2007-10-10, susheel <tatasushil@gmail.com> wrote:
> Hi
>
> Position: Perl Programmer

You have posted a job posting or a resume in a technical group.

Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.

Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :)  (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).

Please do not explain your posting by saying "but I saw other job
postings here".  Just because one person jumps off a bridge, doesn't
mean everyone does.  Those postings are also in error, and I've
probably already notified them as well.

If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.

http://jobs.perl.org may be of more use to you

Yours for a better usenet,

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Good marriages work this way too, by the way.  I love my wife
differently than I did at the beginning, but I certainly don't love
her any less.    - Larry Wall


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

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:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#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 926
**************************************


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