[13021] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 431 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 9 13:07:42 1999

Date: Mon, 9 Aug 1999 10:05:10 -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, 9 Aug 1999     Volume: 9 Number: 431

Today's topics:
        auto email (Predator)
    Re: Code management question. (M.J.T. Guy)
        Control characters in Perl <brundlefly76@hotmail.com>
    Re: Control characters in Perl (Malcolm Ray)
    Re: Control characters in Perl (Jack Applin)
    Re: Control characters in Perl <mike@crusaders.no>
    Re: creating directories as needed <cornelp@webdevelopmentgroup.net>
    Re: Creating variables on the fly with CGI.pm? <vlad@doom.net>
    Re: Creating variables on the fly with CGI.pm? (Anno Siegel)
    Re: Creating variables on the fly with CGI.pm? (Anno Siegel)
    Re: exists problem (Anno Siegel)
    Re: Nastiness contrary to the spirit of perl? (Darrell Stec)
    Re: Nastiness contrary to the spirit of perl? <uri@sysarch.com>
    Re: Nicer Way (Larry Rosler)
        Passing Parameters amerar@ci.chi.il.us
    Re: Passing Parameters <uri@sysarch.com>
    Re: Perl windows admin question. <c4jgurney@my-deja.com>
        pipes and file handles slmlambert@my-deja.com
    Re: pipes and file handles (Malcolm Ray)
    Re: Problem with standard IO::Socket::INET module (Craig J Copi)
    Re: send perl-users mini-faq <dparrott@ford.com>
        Simple write routine <paulm@dirigo.com>
    Re: Simple write routine <cornelp@webdevelopmentgroup.net>
        Storing email messages <cs454@hotmail.com>
    Re: Storing email messages <mike@crusaders.no>
        User Authentication <matthew.porter@wwt.com>
        Using C Librry with Perl... <cheminot-bros@a2points.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: 9 Aug 1999 16:01:43 GMT
From: isc60283@leonis.nus.edu.sg (Predator)
Subject: auto email
Message-Id: <7omu17$818$2@nuscc.nus.edu.sg>

hi, can some1 show me or tell me where to look for a send mail program in
NT platform.
thanks

--

  ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ 
´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç 
È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û 
Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï 
ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ 



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

Date: 9 Aug 1999 16:27:01 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Code management question.
Message-Id: <7omvgl$3nc$1@pegasus.csx.cam.ac.uk>

Serguei Goumeniouk  <serguei.goumeniouk@midwal.ca> wrote:
>     Dear Experts!
> In C/C++ environment I use the following constructions to select a
>program debug printout level:

a)   Perl lets you define compile-time constants.
b)   Perl calculates constant expressions at compile time.
c)   If a condition evaluates to FALSE at compile time, Perl will remove
     the test and the controlled code.

So you can write things like

     use constant DEBUG => 1;

     if (DEBUG > 0) {
           # code obeyed for levels 1,2,3,4
     };

     if (DEBUG > 2) {
           # code obeyed for levels 3 and 4
     };

and know it'll cost you nothing at runtime.


Mike Guy


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

Date: Mon, 09 Aug 1999 16:07:35 GMT
From: Brundle <brundlefly76@hotmail.com>
Subject: Control characters in Perl
Message-Id: <7omubt$ka5$1@nnrp1.deja.com>

The following statement ( a standalone perl program):

my $test=join(/\004/,qw(one two three));
Results in:
Use of uninitialized value

Anyone know why?

How come I can split on control characters just fine but I cannot join
using the same expresssion?





Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 9 Aug 1999 16:31:14 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: Control characters in Perl
Message-Id: <slrn7qu0ii.pah.M.Ray@carlova.ulcc.ac.uk>

On Mon, 09 Aug 1999 16:07:35 GMT, Brundle <brundlefly76@hotmail.com> wrote:
>The following statement ( a standalone perl program):
>
>my $test=join(/\004/,qw(one two three));
>Results in:
>Use of uninitialized value
>
>Anyone know why?
>
>How come I can split on control characters just fine but I cannot join
>using the same expresssion?

perldoc -f join

If you still don't get it, try this:

$_ = "\004";
my $test=join(/\004/,qw(one two three));
print $test, "\n";

This should print:

one1two1three

Got it yet?  What's the value of a m// in scalar context?
-- 
Malcolm Ray                           University of London Computer Centre


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

Date: 9 Aug 1999 16:34:41 GMT
From: neutron@fc.hp.com (Jack Applin)
Subject: Re: Control characters in Perl
Message-Id: <7omvv1$mrk$1@fcnews.fc.hp.com>

Brundle (brundlefly76@hotmail.com) wrote:
> The following statement ( a standalone perl program):
>
> my $test=join(/\004/,qw(one two three));
> Results in:
> Use of uninitialized value

Try this:

  my $test=join("\004", qw(one two three));

There's no reason to have a pattern there--it's just a string.



						-Jack Applin
						 neutron@fc.hp.com


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

Date: Mon, 9 Aug 1999 18:50:11 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Control characters in Perl
Message-Id: <qFDr3.371$aT1.4329@news1.online.no>


Brundle <brundlefly76@hotmail.com> wrote in message
news:7omubt$ka5$1@nnrp1.deja.com...
> The following statement ( a standalone perl program):
>
> my $test=join(/\004/,qw(one two three));
> Results in:
> Use of uninitialized value
>
> Anyone know why?
>
> How come I can split on control characters just fine but I cannot join
> using the same expresssion?

Joining by the same /regular/ expression in fact.

my $test=join("\004",qw(one two three));

passes without warnings.

--
Trond Michelsen






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

Date: Mon, 09 Aug 1999 16:44:11 GMT
From: Cornel Popescu <cornelp@webdevelopmentgroup.net>
Subject: Re: creating directories as needed
Message-Id: <7on0gn$m2a$1@nnrp1.deja.com>

How about reading the lines from the config file in a hash and then
if ( -d $hash{'ITEM'} ) {
 .... } else {
mkdir ("dirname",0755)
}

Cornel

In article <37aeedb5.150638293@news.enteract.com>,
  syarbrou@nospam.enteract.com (Steve .) wrote:
> I have a config file with a list of things to do.  For each of those
> things I need to make sure a directory is created or exists with the
> same name as what is placed in the config file.  How would I make sure
> the directory exists and if it doesn't, create it?  I assume I would
> use mkdir to create the directory if it failes say on an opendir, but
> wanted to check if that was the best way to do it.  THanks.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 9 Aug 1999 12:26:13 GMT
From: <vlad@doom.net>
Subject: Re: Creating variables on the fly with CGI.pm?
Message-Id: <7omhd5$t6r$2@news.servint.com>

vlad@doom.net wrote:
> I've tried many different ways and none work. So I was wondering, is there a way to
> do the above with -w and use strict on?  Or is there another way of doing this other
> than declaring everything? Or should I not be writing code like this to begin with :)

In regards to my previous post, I wanted to clarify that I _do_ understand why this 
doesn't work, so I don't need anyone to tell me, oh it won't cause blah blah :)

I was just wondering if there was another shorucut I could take.

Thanks

-- 
-v


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

Date: 9 Aug 1999 16:39:42 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Creating variables on the fly with CGI.pm?
Message-Id: <7on08e$ll6$1@lublin.zrz.tu-berlin.de>

 <vlad@doom.net> wrote in comp.lang.perl.misc:
>I was wondering if anyone knew if the following code is valid or not.
>I have a website with a form that contains a lot of input fields, they
>each have there own name and I want to create variables using the same 
>name for easier tracking..
>
>I used to create variables for them the following way:
>
>my $var1 = param("var1");
>my $var2 = param("var2");
>my $var3 = param("var3");
>etc.
>
>The above ended up being a page or two worth of declarations, so instead
>I did this, which is a lot smaller obviously:
>
>my @fields = param ();
>
>for (@fields) {
>	${$_} = param ($_);
>}

${$_} is a symbolic reference.  EVIL!

>This works just fine when I don't use -w and use strict.  But breaks when I do,
>the problem is I can't "my" ${$_} and if do, I usually end up with errors like:
>
>Can't use global $_ in "my" at test.cgi line 8.

The problem is, symbolic references work only with package variables.
Variables declared via my aren't in a symbol table (which is, basically
the same as a package), and symbolic references don't work with them.
The part of use strict which stops you from using symrefs is the
strict 'refs' component.  If you must, you can switch it off with
no strict 'refs'.  You'll still have strict 'vars' in effect and will
either have to declare them via use vars @fields, or access each variable
via ${"main::$_"}.

>And even if I could my them, wouldn't they stay private in the for loop.
>
>I've tried many different ways and none work. So I was wondering, is there a way to
>do the above with -w and use strict on?  Or is there another way of doing this other
>than declaring everything? Or should I not be writing code like this to begin with :)

Probably.  But I'll leave it to folks with direct experience with the
CGI module if these practices are considered acceptable.  In any case,
if you want my-variables, you'll have to fiddle with eval to get them,
which is perhaps still more evil than symrefs.

The Perl way to do create your own name space is to use a hash:

foreach ( @fields ) { $hash{ $_} = param( $_) }

However I suspect that's just how the param() function is implemented,
so if you don't need to change a value during your program, it would
be just as well to access it through the param function directly.

Anno


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

Date: 9 Aug 1999 16:41:22 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Creating variables on the fly with CGI.pm?
Message-Id: <7on0bi$lme$1@lublin.zrz.tu-berlin.de>

 <vlad@doom.net> wrote in comp.lang.perl.misc:
>vlad@doom.net wrote:
>> I've tried many different ways and none work. So I was wondering, is there a way to
>> do the above with -w and use strict on?  Or is there another way of doing this other
>> than declaring everything? Or should I not be writing code like this to begin with :)
>
>In regards to my previous post, I wanted to clarify that I _do_ understand why this 
>doesn't work, so I don't need anyone to tell me, oh it won't cause blah blah :)

Too late.  See my reply.

Anno


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

Date: 9 Aug 1999 16:07:54 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: exists problem
Message-Id: <7omucq$lj6$1@lublin.zrz.tu-berlin.de>

Uri Guttman  <uri@sysarch.com> wrote in comp.lang.perl.misc:
>>>>>> "AS" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
>
>  >> Is it possible that the exists function doesn't exist in earlier
>  >> versions?   Since I found it in a perl book on version 5 I thought it
>  >> would work on all 5.x versions.
>
>  AS> It's been around far longer than perl5.
>
>exists came into existance with perl5. it is not in the pink camel.

Gulp, 's right.  I'm sorry.

Anno


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

Date: 09 Aug 1999 16:32:56 GMT
From: darstec@aol.com (Darrell Stec)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <19990809123256.22916.00003751@ngol05.aol.com>

In article <1dw746v.irehoo1kdrynuN@roxboro0-0021.dyn.interpath.net>,
planb@newsreaders.com (J. Moreno) writes:

>
>Darrell Stec <darstec@aol.com> wrote:
>
>> fl_aggie@thepentagon.com (I R A Darth Aggie) writes:
>> 
>> >
>> >Darrell Stec <darstec@aol.com>, in
>> >
>> >+ I don't think there were ever "real" standards on the Internet.
>> >
>> >Oh, yes there are. Speaking of which, as a matter of nettiquette,
>> >could you trim your line folding to about 72 or so characters? thanks.
>> 
>> No, I can't and neither can some 20 million or so members of AOL.  Now if
>you
>> would like to talk to Steve Case about it..........
>
>You can't set it to 72, but there is something so that it normally wraps
>at 74...(not in the display of course, but when sending).

While this is part of the discussion is way off topic, I needed to add that
they "broke" the news reader with improvements last year, and what you see is
what I get.  Every once in a while they fix the problem then break things
again.  No controls or word wrapping options exist.  We have no choice of mail
or news readers.

>
>-snip-
>> You just said "I don't think I've seen anyone post like this and get
>> flamed for it:
>>    I read the documentation, but I just don't get it."  That refers to
>> those who obviously state that they read the documentation.  I repeat, how
>> do you know that they are ignoring the documention instead of just not
>> understanding it.  You are making a very large assumption here, just
>> because they may not mention that they tried to find something in the
>> documentation or didn't understand it.
>
>Doesn't matter -- they deserve to be lumped in with the clueless.
>
>Until the psychic.pm module is fully functioning, the only assumption
>that makes since (without it being explicitly stated otherwise) is that
>someone that has a real basic question hasn't read the relevant docs.
>Because it's impossible to give an answer that assumes that they read
>the docs but didn't understand them for some reasons -- if they've read
>the docs but for some reason neglect to mention that fact, there's no
>way to even begin to guess /what/ in the documentation is causing the
>confusing.
>
>-snip-
>> it is difficult to understand that MOV means "MOVe", SUB means "SUBtract",
>> CMP means "CoMPare", and JL means "Jump if Less than".  And that is so
>> much more difficult to understand with abbreviations so close to their
>> real words, than something as terse and cryptic like:  if
>> m/^\w+(?=\s+Nasty)/
>
>It's a lot easier than reading and understanding what the equivalent
>assembly would look like.

The keywords in Assembly are abbreviations which resemble the words they stand
for, much closer to the English language, than do the cryptic abbreviations and
symbols used in Perl.  Take for instance the "g" option used in pattern
matching, there is nothing in that character that even remotely hints that it
is used to find every occurrance of the pattern.

While the Assembly version of that expression might be more tedious to write,
the keywords like MOV, CMP, etc., that would be used in the code,  would be
much easier to read with less memorization than the Perl counterpart.

>
>> >  $year="20$year";
>> >}
>> >
>> >It is to say the least a most unique Y2K bug they've introduced. It is
>> >left to the reader to discover *why* that code is WRONG WRONG WRONG.
>
>Frankly I've seen it before -- in this group as an example of what not
>to do; a couple of years ago.
>
>> And the only ones that would have been aware of that, are the blessed holy
>> order of the RTFMers?  So THEY had to answer and no one else?
>
>No, but you'd have had to have read some manual on localtime (either
>from perl or from C or elsewhere) to see that it is wrong at first
>glance. The problem with that is that someone who hasn't read that part
>of the manual may choose NOT to read the manual based upon a false
>understanding of what is supposed to happen.
>
>So when someone post such utter stupidity the only proper response is to
>flame the hell out of them, in the hopes that (1) they won't do it
>again, (2) the non-clueless newbie will read it and RTFM, and (3) as a
>warning to other morons that they should be more careful when posting or
>they too will go through life extra crispy.
>
>-- 
>John Moreno
>
>
>

Well, John, I'm happy to have finally met someone like yourself, with the
intelligence and genius to have never made a mistake, and to have never
misunderstood or misinterpeted a book, manual, or any other documentation you
have read.  It is an exceedingly rare gift that you have.
 

Later,
Darrell Stec                               E-Mail: DarStec@aol.com

Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages




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

Date: 09 Aug 1999 13:02:15 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <x7g11sdh0n.fsf@home.sysarch.com>

>>>>> "DS" == Darrell Stec <darstec@aol.com> writes:


  DS> The keywords in Assembly are abbreviations which resemble the
  DS> words they stand for, much closer to the English language, than do
  DS> the cryptic abbreviations and symbols used in Perl.  Take for
  DS> instance the "g" option used in pattern matching, there is nothing
  DS> in that character that even remotely hints that it is used to find
  DS> every occurrance of the pattern.

g stands for global. it does the replacement throughout the string or
'globally'. larry picked the function names very well and the symbols
map to many concepts used in other common languages. perl did not spring
into existance blindly however you may think that. it is not some purist
academic language nor some overpromoted bloat nor some handcuffing set
of restrictions.

perl fits the 80/20 rule very well. it does %80 of the jobs better than
%80 of other languages that can do those jobs. that's a large chunk of
winning for one language. any language might beat perl (possibly in
speed and almost never in code size or development time) for some tasks,
but none can continually beat it across the board for the breadth and
depth of perl's power and its library base (cpan of course).

  DS> While the Assembly version of that expression might be more
  DS> tedious to write, the keywords like MOV, CMP, etc., that would be
  DS> used in the code, would be much easier to read with less
  DS> memorization than the Perl counterpart.

bullhockey. if you can't learn a language, that doesn't make it
wrong. you learn what you need to learn. i did years of pdp-11 assembly
and the fact that it had only about 30 main instructions to memorize
didn't make it easier to program in. and comparing assembly mnenonics to
perl operators is so off base as to be ignorable. go do your work in
assembler and leave perl alone. it is doing fine without you.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Mon, 9 Aug 1999 09:57:27 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Nicer Way
Message-Id: <MPG.1218a856743e5b40989e0f@nntp.hpl.hp.com>

In article <rqtrki89kur47@corp.supernews.com> on Mon, 9 Aug 1999 
10:09:12 -0500, Scott Beck <admin@gatewaysolutions.net> says...
> Mabe there is somthing wrong with the way Outlook Exp. is reading the Mime
> Type.
> What program are you using and where can I get a copy. I've been looking for
> somthing to replace Outlook!

Anything is better than X-Newsreader: Microsoft Outlook Express 
5.00.2314.1300.

My choice is Gravity, at http://www.microplanet.com/, which costs about 
$30 and is well worth it in terms of functionality and your time saved.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 09 Aug 1999 16:01:59 GMT
From: amerar@ci.chi.il.us
Subject: Passing Parameters
Message-Id: <7omu1e$k69$1@nnrp1.deja.com>



Hello,

We are running Solaris 2.6 here.  I want to be able to pass command-line
parameters to a Perl script.  How can I do this?

Thanks,

Arthur
amerar@ci.chi.il.us

ps.  Please cc in e-mail.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 09 Aug 1999 12:24:12 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Passing Parameters
Message-Id: <x7n1w0dis3.fsf@home.sysarch.com>

>>>>> "a" == amerar  <amerar@ci.chi.il.us> writes:

  a> We are running Solaris 2.6 here.  I want to be able to pass command-line
  a> parameters to a Perl script.  How can I do this?

have you read ANY documentation or books on perl? if not do so and you
will abe to find that for yourself in only a few minutes.

  a> ps.  Please cc in e-mail.

sure, but it won't have your answer. you have to learn how to look up
stuff like that. even if i told you here you wouldn't grok it enough to
write a program. so read a good perl book (learning perl is considered
the best beginner book) and the copious online documentation (try the
command 'perldoc perl' to see all the sections you have).

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Mon, 09 Aug 1999 16:01:40 GMT
From: Jeremy Gurney <c4jgurney@my-deja.com>
Subject: Re: Perl windows admin question.
Message-Id: <7omu0r$k61$1@nnrp1.deja.com>

In article <7omljv$d5p$1@usenet01.srv.cis.pitt.edu>,
  "Tomsic, Paul" <ptomsic@pitt.edu> wrote:
> Is there a way to access the Directory Security (permissions) and
modify
> them using Perl.

Win32::FileSecurity might do what you want.

Jeremy Gurney
SAS Programmer  |  Proteus Molecular Design Ltd.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 09 Aug 1999 16:09:27 GMT
From: slmlambert@my-deja.com
Subject: pipes and file handles
Message-Id: <7omufc$ki6$1@nnrp1.deja.com>

where to start...

Ultimate goal - to be able to transfer the value of a scalar to a file
on a remote server by using FTP.

It has been suggested that I try to do this by using this by using
pipes and file handles while using the Net:FTP package.

I can use FTP with a file handle, but I am having difficulty in working
out how to point the file handle at the scalar as opposed to a file.  I
am sure this must be possible.

I am not sure if this will make a different, but I am forced to suffer
by writing the code for NT.

Any help will be greatly appreciated,

Simon.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 9 Aug 1999 16:48:07 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: pipes and file handles
Message-Id: <slrn7qu1i7.pah.M.Ray@carlova.ulcc.ac.uk>

On Mon, 09 Aug 1999 16:09:27 GMT, slmlambert@my-deja.com
<slmlambert@my-deja.com> wrote:
>where to start...
>
>Ultimate goal - to be able to transfer the value of a scalar to a file
>on a remote server by using FTP.
>
>It has been suggested that I try to do this by using this by using
>pipes and file handles while using the Net:FTP package.
>
>I can use FTP with a file handle, but I am having difficulty in working
>out how to point the file handle at the scalar as opposed to a file.  I
>am sure this must be possible.
>
>I am not sure if this will make a different, but I am forced to suffer
>by writing the code for NT.
>
>Any help will be greatly appreciated,
>
>Simon.

I guess you didn't see my response to this last Friday, then.  See:

http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=509577876&fmt=text

-- 
Malcolm Ray                           University of London Computer Centre


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

Date: 9 Aug 1999 16:28:04 GMT
From: cjc5@po.cwru.edu (Craig J Copi)
Subject: Re: Problem with standard IO::Socket::INET module
Message-Id: <7omvik$1ff$1@alexander.INS.CWRU.Edu>

In article <37ab9866.001@screwspam.com>,
	"He whom the perl gods have cursed" <hughd@screwspam.com> writes:
> 
> The following mind-numbingly simple script fails to compile:
> 
> #!c:\perl\bin\perl.exe
> use strict;
> use IO::Socket::INET;
> 
> my $sock = IO::Socket::INET->new(PeerAddr => 'some.nntp.server',
>                                                         PeerPort => 'nntp(119)',
>                                                         Proto    => 'tcp');
> 
> Can't locate IO/Socket/INET.pm in @INC (@INC contains: C:\PERL\lib C:\PERL\site\lib .) at dummy.pl line 3.
> BEGIN failed--compilation aborted at dummy.pl line 3.
> 
> The problem is that C:\Perl\lib\IO\Socket.pm defines IO::Socket::INET as well as
> IO::Socket. I tried creating a subdirectory called Socket and putting the code for
> IO::Socket::INET in it in a filed called INET.pm, but then perl complains that it can't
> find the method register_domain (which should be inherited from IO::Socket.)

[various hacks of the modules deleted]

Despite your pointless flames in the rest of this thread (interesting way
to elicit help) I will ask the simple question:
Did you try just use IO:Socket ?  If the code you want is in Socket.pm then
why try loading something that doesn't exist?

Both use statements work with perl 5.005_03 under Linux.  I'm not sorry that I
don't have a braindead system around to see if it will work for you.

      Craig
-- 
Craig J Copi                     |  cjc5@po.cwru.edu
Case Western Reserve University  |  http://erebus.phys.cwru.edu/~copi/
Department of Physics            |  (216) 368-8831


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

Date: Mon, 09 Aug 1999 10:31:57 -0400
From: "Dennis M. Parrott" <dparrott@ford.com>
To: Bill Jones <bill@fccj.org>
Subject: Re: send perl-users mini-faq
Message-Id: <37AEE65D.6A5A1121@ford.com>

Bill Jones wrote:
> 
> send perl-users mini-faq

ahem. Usenet IS NOT an FTP-by-email device.

Read the post titled '[Perl] How to find the Perl FAQ' which
can be found in the comp.lang.perl.announce newsgroup on a
very regular basis. ...and then say thank you to Tom Phoenix
who makes sure that it gets posted there...

Have A Nice Day...

-- 

-----------------------------------------------------------------------
Dennis M. Parrott        |            Unix:  dparrott@ford.com
PCSE Webmaster           |           PROFS:  DPARROTT
Ford Motor Company       |             VAX:  EEE1::PARROTT
Dearborn, Michigan USA   | public Internet:  dparrott@ford.com
-----------------------------------------------------------------------
Voice: 313-322-4933  Fax: 313-248-1234  Pager: 313-851-2958


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

Date: Mon, 09 Aug 1999 16:40:13 GMT
From: Stone Cold <paulm@dirigo.com>
Subject: Simple write routine
Message-Id: <7on09a$m0n$1@nnrp1.deja.com>

Hello!

Anyone have simple code that takes the current date and writes it out
to a temp file?  Any subroutine?  Any place where I can find this code?

--
Paul R. Mesker
System Engineer
Dirigo Inc.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 09 Aug 1999 16:48:15 GMT
From: Cornel Popescu <cornelp@webdevelopmentgroup.net>
Subject: Re: Simple write routine
Message-Id: <7on0ob$mcj$1@nnrp1.deja.com>

In article <7on09a$m0n$1@nnrp1.deja.com>,
  Stone Cold <paulm@dirigo.com> wrote:
> Hello!
>
> Anyone have simple code that takes the current date and writes it out
> to a temp file?  Any subroutine?  Any place where I can find this
code?

$date=`date`;
open (OUT,">today_date");
print OUT $date;

Cornel


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 09 Aug 1999 08:21:00 -0400
From: Doraemon <cs454@hotmail.com>
Subject: Storing email messages
Message-Id: <37AEC7AC.5E4413F2@hotmail.com>

Hello Everyone,

   I created an HTML form which will invoke a perl script when the form
is being submit.  This perl script will parse the form elements and use
the perl module Mail::Send to sent email.  The problem I am having is
storing this email in a file.  I want to save all sent email in a file,
kinda like a "Sent" Folder in a hotmail account so that sent email can
be retrieve later for reference.

    I am not sure if I should use the Mail::Folder module or some other
method.  If the Mail::Folder module is the correct way, what are the
differences between the Mail::Folder::Mbox, Mail::Folder:Maildir, and
the Mail::Folder::Emaul modules.

Thanx very much...
Andrew



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

Date: Mon, 9 Aug 1999 18:36:16 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Storing email messages
Message-Id: <nsDr3.354$aT1.2548@news1.online.no>


Doraemon <cs454@hotmail.com> wrote in message
news:37AEC7AC.5E4413F2@hotmail.com...
> Hello Everyone,
>     I am not sure if I should use the Mail::Folder module or some other
> method.  If the Mail::Folder module is the correct way, what are the
> differences between the Mail::Folder::Mbox, Mail::Folder:Maildir, and
> the Mail::Folder::Emaul modules.

They are different mailbox-formats.

mbox - all messages are stored in one file, separated by a summary header.
Maildir - every message is in a separate file, generated by qmail.
Emaul ? I have no idea :)

oh - let's see what the manpage has to say about it..

       The following folder interfaces are provided with this
       package:

       Mail::Folder::Mbox
           Ye olde standard mailbox format.

       Mail::Folder::Maildir
           An interface to maildir (a la qmail) folders.  This is
           a very interesting folder format.  It is 'missing'
           some of the nicer features that some other folder
           interfaces have (like the message sequences in MH),
           but is probably one of the more resilient folder
           formats around.

       Mail::Folder::Emaul
           Emaul is a folder interfaces of my own design (in the
           loosest sense of the word :-\)).  It is vaguely
           similar to MH.  I wrote it to flesh out earlier
           versions of the Mail::Folder package.

If you try

  perldoc Mail::Folder::$format

you will get even more info about the formats.

--
Trond Michelsen




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

Date: Mon, 09 Aug 1999 16:13:22 +0000
From: Matthew Porter <matthew.porter@wwt.com>
Subject: User Authentication
Message-Id: <37AEFE22.84EE89B1@wwt.com>

Does anyone know how to strip the username and password sumitted from an
authentication box? I need to do this in order to log the user into
other on-line systems.  Any assistance would be greatly appreciated.



Matthew Porter
matthew.porter@wwt.com



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

Date: Mon, 9 Aug 1999 18:25:58 +0200
From: "Olivier & Vincent" <cheminot-bros@a2points.com>
Subject: Using C Librry with Perl...
Message-Id: <7omvf4$f2q$1@wanadoo.fr>

Hi,

I've got a C compiled library with functions I want to
use directly from perl.

I've tried to install DynaLib but without any success :(, perl
returned me the following message : "can't locate loadable
object for module C::DynaLib". The error occured at this
line :

bootstrap C::DynaLib $VERSION, \$C::DynaLib::Callback::Config;

What could I do to make this library working ? (may be I could use
another one).

Thanx in advance for ur help.

Vincent




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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V9 Issue 431
*************************************


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