[12571] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6171 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 29 20:07:28 1999

Date: Tue, 29 Jun 99 17:01:35 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 29 Jun 1999     Volume: 8 Number: 6171

Today's topics:
        POP3 and FTP by email in Perl <hiller@email.com>
    Re: printing to many filehandles simultaneously (Abigail)
    Re: printing to many filehandles simultaneously (Tad McClellan)
        RE: Problem with CGI in IE but not Netscape <torcu99@teleline.es>
        RE: Problem with CGI in IE but not Netscape <torcu99@teleline.es>
        Problem <foroobar@erols.com>
        profiling with DProf <ywong@andrew.cmu.edu>
        Q: Non-truncating var in a format <dpetrou@auchroisk.pdl.cs.cmu.edu>
    Re: Q: Non-truncating var in a format <rootbeer@redcat.com>
    Re: regexp riddle <mike@crusaders.no>
    Re: regexp riddle (Sean McAfee)
    Re: regexp text wrapping question <swiftkid@bigfoot.com>
    Re: regexp text wrapping question <rootbeer@redcat.com>
        Regular Expression <eman@cc.gatech.edu>
    Re: Robot email/poster for this group (Andrew Allen)
    Re: Robot email/poster for this group (John Stanley)
    Re: Robot email/poster for this group (John Stanley)
    Re: Save 40-60% on Cellular & Digital Phone Accessories <swiftkid@bigfoot.com>
    Re: search and replace with <> (Tad McClellan)
        Socket error : Prototype not supported <jon@sitedesignonline.com>
    Re: Starting asynchronous process from Perl (Abigail)
    Re: Week Number without Date Module? (Abigail)
    Re: Week Number without Date Module? (Abigail)
    Re: What is First line in Perl5 in Sun Micro... (139af0000-HornL(DR9127)1w81)
    Re: why doesn't this for loop work (Tad McClellan)
        XS and OOP references? <sjohns17@uic.edu>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 29 Jun 1999 22:40:42 GMT
From: Jordan Hiller <hiller@email.com>
Subject: POP3 and FTP by email in Perl
Message-Id: <37794AEE.F3FFC7A7@email.com>

I am writing a "Web by email" program in Perl. I was wondering if there is a
FTP-by-email program written in Perl for me to take a look at.

Also, I'm not sure how to read email from a POP3 server in perl. Any pointers or
sample code?

Thanks, 
Jordan Hiller
hiller@email.com

:~


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

Date: 29 Jun 1999 18:26:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: printing to many filehandles simultaneously
Message-Id: <slrn7nilh5.1gv.abigail@alexandra.delanet.com>

Laith Suheimat (l.suheimat@mdx.ac.uk) wrote on MMCXXVIII September
MCMXCIII in <URL:news:7lb56o$d1l$1@aquila.mdx.ac.uk>:
() Hello,
() 
() Is there any way of printing to more than one filehandle?

Yeah, sure. You could use tied filehandles that print to 2 real ones
behind your back, but you could also do:

       print  FIRST_FILE_HANDLE "some text";
       print SECOND_FILE_HANDLE "some text";

I bet you didn't know that Perl could have 2 successive print statements!

() I am using Activestate Perl 5.005_03 on NT 4 wkstn sp4, and would really
() like to print to screen (cmd prompt in NT) and to a logfile simultaneously.
() 
() At the moment I either redirect STDOUT to the logfile (thus losing any cmd
() line output), or I have two print commands, one to logfile, and one to
() screen.

Sounds like a job for tee.
<FX sound = "tchrist">Does your tool box have tee?</FX>

() Maybe I need to do a fork?

Ah, yes. fork(). That doesn't quite work on NT, does it?


Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 29 Jun 1999 13:43:48 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: printing to many filehandles simultaneously
Message-Id: <kk0bl7.4k1.ln@magna.metronet.com>

Laith Suheimat (l.suheimat@mdx.ac.uk) wrote:

: Is there any way of printing to more than one filehandle?

   Perl FAQ, part 5:

      "How do I print to more than one file at once?"


: Maybe I need to do a fork?


   Maybe you need to check the Perl FAQs before posting to the 
   Perl newsgroup?


: Thanks in advance,


   Uh huh.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Mon, 28 Jun 1999 14:01:20 +0100
From: "Torcuato" <torcu99@teleline.es>
Subject: RE: Problem with CGI in IE but not Netscape
Message-Id: <7lbfai$glp@telerad.teleline.es>


Matthew Norris <mnorris@nospam.compuvisions.com> escribis en el mensaje de
noticias 3777CD33.BA4BEA51@nospam.compuvisions.com...
>     I have written a script to add, remove, and delete information from
> a tab-delimited text file that is running on a Unix server.  Each line
> of the file contains a number (time the record was created) and that is
> how the records are sorted.  The following lines are where the problem
> arises, entryNum is the number for one of the records in the file.  The
> correct HTML will be outputted in Netscape, but nothing was outputted in
> IE.  I then but in the else clause.  The else clause is outputted in
> IE.  Why does this occur?  I thought Perl ran only on the server side,
> so why would the output be different in IE than in Netscape?  If anyone
> has any ideas, please inform me, I am quite puzzled.  Also, if you
> should need to see anymore of my code, I will be glad to send it to you.

Maybe the error is NOT in the code. I think the error is in the html code
you want to display. Revise it




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

Date: Mon, 28 Jun 1999 14:03:19 +0100
From: "Torcuato" <torcu99@teleline.es>
Subject: RE: Problem with CGI in IE but not Netscape
Message-Id: <7lbfal$glp@telerad.teleline.es>


Matthew Norris <mnorris@nospam.compuvisions.com> escribis en el mensaje de
noticias 3777CD33.BA4BEA51@nospam.compuvisions.com...
>     I have written a script to add, remove, and delete information from
> a tab-delimited text file that is running on a Unix server.  Each line
> of the file contains a number (time the record was created) and that is
> how the records are sorted.  The following lines are where the problem
> arises, entryNum is the number for one of the records in the file.  The
> correct HTML will be outputted in Netscape, but nothing was outputted in
> IE.  I then but in the else clause.  The else clause is outputted in
> IE.  Why does this occur?  I thought Perl ran only on the server side,
> so why would the output be different in IE than in Netscape?  If anyone
> has any ideas, please inform me, I am quite puzzled.  Also, if you
> should need to see anymore of my code, I will be glad to send it to you.
>
> while (<INFO>)
> {
>     @line=(split(/\t/,$_));
>     print "@line[8]&nbsp;$array{'entryNum'}";   # Test if numbers
> correct (they are)
>     if (/$array{'entryNum'}/)     # Had different form of test
> origionally, same problem.
>     {
>         # Here is the HTML that displays in Netscape but not IE
>     }
>     else
>     {
>         #  This HTML is outputted instead of the above.
>     }
> }
>
> Thanks,
> Matthew Norris
>
Maybe the error is NOT in the Perl code. It could be in the HTML code you
want to be outputted.




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

Date: Tue, 29 Jun 1999 19:43:36 -0400
From: "Mike Foroobar" <foroobar@erols.com>
Subject: Problem
Message-Id: <7lblok$h17$2@autumn.news.rcn.net>

As part of a larger script I am making, I need a user authentication script.
All users and their relative passwords are stored in a flatfile database
with the syntax:

user_name|password

When a user executes an action, the script send a querystring with teh user
name and password.  I now need to find out how to make sure that not only
the username is in the database, but that is also his correct password.  I
think I know how to do the first part, but I don't know exactly how it would
be written.  Wouldn't you just read teh file into an array and then just
check to see if the username came up in there using =~?  For the second
part, all I need to determine is if the username and passowrd are on teh
same line.  I tried to read it all into an associative array, but got
nowhere with that.  Any help, especially code, is appreciated.  E-mail me at
mikef@gigagate.com or ICQ at my handle gigagate.

Sincerely,
Mike Foroobar




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

Date: Tue, 29 Jun 1999 18:34:09 -0400
From: interface <ywong@andrew.cmu.edu>
Subject: profiling with DProf
Message-Id: <Pine.SOL.3.96L.990629183052.23593A-100000@unix3.andrew.cmu.edu>


I'm trying to use the Devel::DProf module to profile some code.  When I
try to use it (perl5 -d:Dprof <script.pl>) I get "Can't locate loadable
object for module Devel::DProf in @INC (INC contains: d:/Perl/lib
d:/Perl/site/lib .) at d:/Perl/lib/Devel/Dprof.pm line 120"

It seems like it can't find something, but everything that came with the
module is installed in the /Devel/DProf directory.  Is there something
missing or am I supposed to move or configure something I didn't?

Thanks,

Yishan



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

Date: 29 Jun 1999 22:20:40 GMT
From: David Petrou <dpetrou@auchroisk.pdl.cs.cmu.edu>
Subject: Q: Non-truncating var in a format
Message-Id: <7lbgro$81g$1@goldenapple.srv.cs.cmu.edu>

Consider:

    format OUTPUT =
@<<<<
$var
 .

If $var is over 5 characters, it will be truncated to 5.  If $var is
less, then the remaining space will be padded.

Instead, I'd like to be able to say something like

    format OUTPUT =
@VERBATIM
$var
 .

so that $var will be printed in its entirety.  No truncation, no
padding.

How can I do this?

Thanks,
David


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

Date: Tue, 29 Jun 1999 16:15:34 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Q: Non-truncating var in a format
Message-Id: <Pine.GSO.4.02A.9906291614120.4425-100000@user2.teleport.com>

On 29 Jun 1999, David Petrou wrote:

> Subject: Q: Non-truncating var in a format

> so that $var will be printed in its entirety.  No truncation, no
> padding.

Read about the special field "@*" in perlform. But maybe you don't
really want a format? Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 30 Jun 1999 00:26:07 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: regexp riddle
Message-Id: <cMbe3.664$U%.5209@news1.online.no>


Jordan Hiller <hiller@email.com> wrote in message
news:377935BC.D1FE1515@email.com...
> >         [dxbe]{1,4}
> >         Simple. However, I need to add one more condition. The
> > characters are not permitted to repeat.
> If it's possible to use backreferences this way, maybe you can attempt
something
> like this. This would exclude things that already have been matched but I
know
> my code is quite right. Maybe someone can try fixing it up.
> ([dxbe])([dxbe^\1])([dxbe^\1\2])([dxbe^\1\2\3])

wouldn't /([dxbe])\1{0,3}/ do the trick?

--
Trond Michelsen





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

Date: Tue, 29 Jun 1999 22:40:16 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: regexp riddle
Message-Id: <kXbe3.680$ce5.13217@news.itd.umich.edu>

In article <37792B90.ED90B57D@americasm01.nt.com>,
Soulier, Michael [SKY:1Z22:EXCH] <msoulier@americasm01.nt.com> wrote:
>The regexp for
>my
>specifications so far is

>        [dxbe]{1,4}   

>        Simple. However, I need to add one more condition. The
>characters are
>not permitted to repeat. 

Use lookahead assertions:

/^(?=[dxbe]{1,4}$)(?!.*(.).*\1)/

-- 
Sean McAfee                                                mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!


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

Date: Wed, 30 Jun 1999 03:06:08 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: regexp text wrapping question
Message-Id: <7lcj95$5if7@news.cyber.net.pk>

> Maybe this?
>
>     @foo = $foo =~ /(.{1,53}\b|.{54,}?\b)/sg;


@array = $str =~ /(.{53,}?\b?)/gs;

print $array [ 12 ];

why does it print:
187 188 189 190 191 192 193 194 195 196 197 198 199 2

and not 200 ?




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

Date: Tue, 29 Jun 1999 16:10:42 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: regexp text wrapping question
Message-Id: <Pine.GSO.4.02A.9906291609340.4425-100000@user2.teleport.com>

On Wed, 30 Jun 1999, Faisal Nasim wrote:

> @array = $str =~ /(.{53,}?\b?)/gs;

What is '\b?' doing? Does it mean "A word break or not?" :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 29 Jun 1999 19:45:09 -0400
From: Eric Anderson <eman@cc.gatech.edu>
Subject: Regular Expression
Message-Id: <37795A85.6F70B387@cc.gatech.edu>

I have a regular expression that I am trying to get to match to
$parseString. Basically the code is as follows:

    if ( $parseString =~ /\<%\s*@\s*language\s*=\s*\"?(\w+)\"?\s*%\>/i )
{
	$language = $1;
    } else {
	$language = "Not Found";
    }

Now when $parseString contains the following:

<%@ Language = VBScript %>

$language should be equal to "VBScript", but instead the pattern is not
matched, so $language is assigned "Not Found".

I wasn't sure if the "%" character should have the "\" before it (like
\%). Also I wasn't sure if "@" character should have a "\" before it,
but I have tried putting a "\" in front of both. Still no match is made.
Anybody have any ideas.

-- 
Eric Anderson
Computer Science, Georgia Tech
Co-op, Southern Regional Education Board
ICQ# 1279816


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

Date: 29 Jun 1999 22:00:30 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: Robot email/poster for this group
Message-Id: <7lbflu$rv0$1@fcnews.fc.hp.com>

John Stanley (stanley@skyking.OCE.ORST.EDU) wrote:
: If you do not read comp.lang.perl.moderated, you might not have learned
: that the gurus there are contemplating the creation of a robot for this
: group. I haven't seen them discuss it here, though.

Perhaps you need to install Sense::Humor and try again.

Andrew


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

Date: 29 Jun 1999 22:29:12 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Robot email/poster for this group
Message-Id: <7lbhbo$5de$1@news.NERO.NET>

In article <377b27a4.6551971@enews.newsguy.com>,
Marcel Grunauer <marcel.grunauer@lovely.net> wrote:
>Why didn't you post this to the relevant thread on
>comp.lang.perl.moderated? Afraid you might have to join in the
>discussion?

If you bothered to read the .moderated group, you would see that I
posted my comments there, three times. If you bothered to read the
moderated group, you would notice that the moderators there have finally
decided that the discussion of the robot is off-topic for the moderated
group and should move here. 

>No, just post it here, where you can spread FUD. 

Hardly. I've posted there, and since those who were planning the robot
didn't think it appropriate to post here to let anyone here know what
they were planning, I posted here, too.

>"They want to leave!
>It's the end of Perl as we know it! They're moving to another
>dimension and leave us to deal with the Shadows!"
>"They will cast the level 9 Miscy spell on this group and turn it into
>a squeaking helpdesk!"

I have no idea what the hell you are talking about. Apparently, since
you didn't notice that I have participated in the discussion in the
moderated thread, you don't know, either.

>The moderated group doesn't really get much traffic, and by far the
>bulk of the discussion takes place here. But a lot of the questions
>that get posted here (note the wording, does it sound a bit like a
>helpdesk?) *are* FAQs, and I can understand that people are getting
>tired of posting the same answers again and again. And again.

The correct answer is not to create more noise by subjecting the group
to a robot.

>But social issues aside you'll have to admit that it is a fascinating
>project.

But, as I said, not for a USENET DISUCSSION group.



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

Date: 29 Jun 1999 22:41:12 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Robot email/poster for this group
Message-Id: <7lbi28$5oc$1@news.NERO.NET>

In article <3779397D.84D133B7@mail.cor.epa.gov>,
David Cassell  <cassell@mail.cor.epa.gov> wrote:
>Not necessarily.  It may not be anything like this.  What you
>have is one scenario by one poster.  Others were insistent

What I have it what was proposed. 

>that there not be email running around loose.  The final form
>is still *totally* up in the air.

That is what "proposed" means.

>> So, if you come to the group after reading the FAQ and have a question,
>> you may very well get a nice email telling you to read the FAQ, and a
>> posting here that says that the answer is in the FAQ you were mailed. If
>
>You mean, as opposed to the automatic "Go read the FAQ, you stupid
>clueless pinhead" posts we now see?  

Which robot posts these? If it is not a robot, then no, not like the
posts you referred to.

>> There have even been proposed a way to post questions to the robot,
>> which has been given the cute name "miscy". "Miscy -- what is the URL
>> for X?"
>
>And most people thought this was a bad idea, if I remember the
>counts correctly.  

I saw it about even. 

>Have you checked out #perl?  

Is #perl a USENET discussion group? 

>Ask url for some help to a question.
>Ask the people there what their opinions are on url's helpfulness.
>If an autobot can work in a Perl IRC setting, I don't see why it
>wouldn't work here.

Ummmm, because this isn't IRC, its USENET?

>> I lost count of the number of people who complained that this newsgroup
>> was becoming a "help desk", and who voted for a moderated group so they
>> could get away from the problem.
>
>The gurus who didn't want to associate with the great unwashed have
>left this newsgroup never to return.  They have other newsgroups and
>listservs where they live.  What does that have to do with the
>conscientious people who continue to answer questions here,
>regardless of their level of frustration?

I don't know, you tell me. I was talking about a proposal in the
 .moderated group, where they all went, that talks about a robot intended
to operate in a different group (here). I know, let's talk about a robot
that can solve the problems for soc.support.*.

>Hardly.  I think that is really unfair to the people who talked about 
>this in c.l.perl.moderated .  They wanted to find a *better* way
>to answer some of the questions that hit here with great regularity.

Of course, discussing it in the group where they want to perform the
experiment was just an oversite.  They didn't know the group existed and
didn't know they should post here?

>Don't you think it would be better for everyone if Miscy answered
>someone who asked about CGI redirections with a polite [if canned]
>response, rather than having [the names are changed to protect the
>guilty] PedantBoy flame the poster, then Grouchy yell at the poster
>for posting in the wrong group, then InYrFace tell them to go RTFFAQ,
>then DropDead tell them to give up programming and go flip burgers
>for a living, then...  Well, you get my drift.

No, I don't think it would be better. Because the same robot that
answers him would be reading this article and trying to guess the
question I am asking, and then it would mail me the answer. Or post the
answer. Or both.

>My feeling is that I'm more than willing to see how this experiment
>turns out.  

If it isn't done here. 

>If you're really that concerned about Miscy turning into some sort
>of Perlish version of the Forbin Project, 

That's interesting that you refer to the Forbin Project. That's just how
one of the proposers described it.

>then you could volunteer
>in the project and make your voice heard.. 

Oh, give me a break. If I don't want a robot to be dumped on this group,
I should help program the robot so it can be dumped on the group sooner?
That's ridiculous.

>not to mention your
>programming skills.  This is not a Gurus-vs-Newbies issue.  This
>is a helping-others issue.

Yeah, the gurus in the .moderated group helping us fools who still use
this group. No thanks.

>And it might even help us get TomC's blood pressure back down
>below 190/140 .  :-)

Since Tom is one of the major sources of noise here, I'm not too
worried. I've got how many copies of the FAQ, now? And the man pages,
which Tom keeps pointing out are distributed with each copy of perl?



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

Date: Wed, 30 Jun 1999 03:14:17 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Save 40-60% on Cellular & Digital Phone Accessories
Message-Id: <7lcjod$5if9@news.cyber.net.pk>

<icwpcs@aol.com> wrote in message
news:7lbbuv$96c$10200@mercury.hiline.net...
>
>   Need a new battery, car charger or leather protective carrying case for
your
>
> cellular or digital phone? We offer package prices on acessories for the
most

Are they made from Perl?

print lc $answer eq 'yes' ? 'wow' : 'boo, don't spam here';




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

Date: Tue, 29 Jun 1999 12:51:12 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: search and replace with <>
Message-Id: <0ital7.181.ln@magna.metronet.com>

Phil R Lawrence (prlawrence@lehigh.edu) wrote:

: This Search and Replace script seems to correctly go through the files, but
: while it claims there have been replacements, no change has actually been made
: to the files in question.  Can anyone see why?


   Yes.

   You did not *ask* to change the file.

   You have no output statements, so you get no output.


   Perl FAQ, part 5:

      "How do I change one line in a file/
       delete a line in a file/
       insert a line in the middle of a file/
       append to the beginning of a file?"


   See also the -i switch in perlrun.pod.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 29 Jun 1999 16:23:27 -0700
From: Jon Lustig <jon@sitedesignonline.com>
Subject: Socket error : Prototype not supported
Message-Id: <3779556F.7C704BF2@sitedesignonline.com>

This is a multi-part message in MIME format.
--------------CE7090012B176D856A330C08
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



--------------CE7090012B176D856A330C08
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

X-Mozilla-Status2: 00000000
Message-ID: <37732392.113AD20F@sitedesignonline.com>
Date: Thu, 24 Jun 1999 23:37:06 -0700
From: Jon Lustig <jon@sitedesignonline.com>
Reply-To: jon@sitedesignonline.com
Organization: Site Design Online
X-Mailer: Mozilla 4.5 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.lang.perl.misc
Subject: Socket error : Prototype not supported
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I'm creating a little cookie server, based on that from ORA's CGI
Programming.  After a little trial and error, I went with the Socket
package, and I'm getting the following error when I try to create the
socket: 'Protocol not supported at ...'

I know nothing of sockets, but i looked up the system getprotobyname
call and the /etc/protocols file looks in order, complete with 'tcp'
entry - what am I missing?

Here's the relevant code:
---------------------------------
require Socket;

my $proto = getprotobyname('tcp');

socket(SOCKET,PF_LOCAL,SOCK_STREAM,$proto) or die "socket : $!";
---------------------------------

Thanks
Jon
jon@fraczard.com



--------------CE7090012B176D856A330C08--



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

Date: 29 Jun 1999 18:48:40 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Starting asynchronous process from Perl
Message-Id: <slrn7nimqa.1gv.abigail@alexandra.delanet.com>

Philip Weingart (pweingart@worldnet.att.net) wrote on MMCXXVIII September
MCMXCIII in <URL:news:377915D8.21118806@worldnet.att.net>:
$$ 
$$ I want to fire off a subprocess from a Perl script and continue with the scri
$$ without waiting for the subprocess to finish. In the Korn shell something lik
$$ this is simple; you just enclose the call in parenthesis, invoking a subshell
$$ How do I do it in Perl?


fork ()



Abigail
-- 
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 29 Jun 1999 18:30:42 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Week Number without Date Module?
Message-Id: <slrn7niloj.1gv.abigail@alexandra.delanet.com>

Riccardo Gubser (riccardo.gubser@ubs.com) wrote on MMCXXVIII September
MCMXCIII in <URL:news:3778C08A.31474A59@ubs.com>:
|| hiya there
|| 
|| i have to create a folder for each week number. Yeah i know should be no
|| problem with the Date::Calc Function, but we don't have it and we can't
|| install it beceause of the sysad.

You sysad doesn't allow you to create any file? Then how do you program?

|| is there any other function or method to find out which week number we
|| have.

Well, given that most weeks are 7 days, some fiddling with the 7th and
8th element of the list returned by localtime() will tell you. Don't
forget to first define when weeks start, and what the first week of the
year is. ISO and US weeks seem to be different in certain years.



Abigail
-- 
perl -wlne '}print$.;{' file  # Count the number of lines.


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 29 Jun 1999 18:36:44 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Week Number without Date Module?
Message-Id: <slrn7nim3t.1gv.abigail@alexandra.delanet.com>

Tom Christiansen (tchrist@mox.perl.com) wrote on MMCXXVIII September
MCMXCIII in <URL:news:3778d57a@cs.colorado.edu>:
@@      [courtesy cc of this posting mailed to cited author]
@@ 
@@ In comp.lang.perl.misc, Gareth Rees <garethr@cre.canon.co.uk> writes:
@@ :Use the standard!  (That is, ISO 8601 "Data elements and interchange
@@ :formats - Information exchange - Representation of dates and times"
@@ :http://www.iso.ch/markete/8601.pdf)
@@ 
@@ That's nice.  I'm sure the ISO folks have other standards as well, like
@@ meters and grams.  But as always, existing practice has a strong voice.
@@ Have you ever looked at American business calendars?  Many of these
@@ have historically deemed the first week containing the first workday
@@ (meaning Monday) as the first work week.


Yeah, but since Riccardo has an email account that indicates he works
for a large Swiss bank, I'm not quite sure whether American business
calenders are relevant to him. On the other hand, he might be working
from the NYC office.



Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 29 Jun 1999 22:31:07 GMT
From: lhorn@lucent.com (139af0000-HornL(DR9127)1w81)
Subject: Re: What is First line in Perl5 in Sun Micro...
Message-Id: <7lbhfb$7hk@nntpa.cb.lucent.com>


Along the lines of the first line shebang question,
Is there any way to use an environment variable on the
first line? For example:

#!$MY_PERL_PATH/perl5

Or possibly some other syntax using ENV?

Thanks for any help

-- 

Larry Horn
Lucent Technologies
lhorn@lucent.com




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

Date: Tue, 29 Jun 1999 12:53:00 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: why doesn't this for loop work
Message-Id: <cltal7.181.ln@magna.metronet.com>

mike cardeiro (mikecard@my-deja.com) wrote:

: 	for ($y = 0, $y <= $num_players, ++$y) {
                   ^                   ^
                   ^                   ^

: 			for ($a = 0, $a <= 2, ++$a) {
                                   ^        ^
                                   ^        ^
   s/,/;/g;

   You are not using the correct syntax.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 29 Jun 1999 18:11:01 -0500
From: Seth David Johnson <sjohns17@uic.edu>
Subject: XS and OOP references?
Message-Id: <Pine.A41.4.10.9906291810150.771582-100000@tigger.cc.uic.edu>

Hi-

Can anyone suggest a good reference for writing constructors, returning
blessed object references, etc. etc. in XS? I'm working on a module
right now and would prefer not to do my construction in Perl (for reasons
that are a bit lengthy).

Thanks in advance,
-Seth Johnson



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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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 V8 Issue 6171
**************************************

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