[12655] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 64 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 7 16:47:31 1999

Date: Wed, 7 Jul 1999 13:36:20 -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           Wed, 7 Jul 1999     Volume: 9 Number: 64

Today's topics:
        Serial Ports - How do I send a 'break'? <abeowitz@chesapeake.net>
        Small flat db with password protection <marco@beijen.com>
    Re: something similar to 'creat' in C (Ronald J Kimball)
    Re: something similar to 'creat' in C (Philip 'Yes, that's my address' Newton)
    Re: sorting hashes with some identical fields <Savage.Ron.RS@bhp.com.au>
        Stability Question <tarsi@cs.ucla.edu>
    Re: Stability Question (Bart Lateur)
        Subroutines in a package <j@mesduncan.co.uk>
    Re: Subroutines in a package (Marcel)
    Re: Subroutines in a package <j@mesduncan.co.uk>
    Re: Subroutines in a package <dehon_olivier@jpmorgan.com>
    Re: Subroutines in a package <tchrist@mox.perl.com>
        Telnet Query <rkraly@netway.at>
    Re: time question garthwebb@yahoo.com
    Re: time question (Alastair)
    Re: time question <mike@crusaders.no>
    Re: time question (Abigail)
    Re: time question (Abigail)
    Re: time question (Larry Rosler)
    Re: time question (Larry Rosler)
        Timer on a web-page.. <gjmorey@uwaterloo.ca>
    Re: Timer on a web-page.. <mike@crusaders.no>
        Unbelievably simple question <rtlloyd@easynet.co.uk>
    Re: Unbelievably simple question <arnej@fc.hp.com>
    Re: Unbelievably simple question (Abigail)
    Re: Unbelievably simple question <Savage.Ron.RS@bhp.com.au>
    Re: Unbelievably simple question <JFedor@datacom-css.com>
    Re: Unexpected behavior of Perl classes (Eric Bohlman)
        unzip <tanya@i-cable.com>
    Re: unzip (Abigail)
        RE: unzip <torcu99@teleline.es>
        UPS shipping code??? <adams1015@worldnet.att.net>
    Re: UPS shipping code??? (Matthew Bafford)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Tue, 06 Jul 1999 21:47:45 -0400
From: Abe <abeowitz@chesapeake.net>
Subject: Serial Ports - How do I send a 'break'?
Message-Id: <3782B1C0.1081500C@chesapeake.net>

Hello,

I have Perl talking really well to a serial port/modem.  But I need to send a 'break' signal.  In 'C' this is explained.  I can do it from the command line, but when in a Perl program, the modem is locked.

So, how do I send a 'break' signal from Perl?

Thanks in advance!

abeowitz@chesapeake.net



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

Date: Wed, 7 Jul 1999 11:20:13 -0400
From: "Marco Beijen" <marco@beijen.com>
Subject: Small flat db with password protection
Message-Id: <7lvqn7$q30$1@news2.jic.com>

I am looking some scripts which will make it possible for me to let various
people enter some information into a form including a password, which will
be stored in a flat file db. When that's stored only with the use of the
password, that file can be changed.

Have anybody seen something like this? Who can help me?

All help is appreciated !!

Kind regards,
Marco
from the Netherlands, and yes it is raining here... :)




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

Date: Tue, 6 Jul 1999 21:57:21 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: something similar to 'creat' in C
Message-Id: <1dujivy.rlx7ti6gxcefN@p158.block1.tc4.state.ma.tiac.com>

Alan Curry <pacman@defiant.cqc.com> wrote:

> In article <7ls160$3ia1@atbhp.corpmel.bhp.com.au>,
> Ron Savage <Savage.Ron.RS@bhp.com.au> wrote:
> >See below
> 
> Aww, how cute, a guidepost warning us that this post is actually written in a
> sensible order.

No, a guidepost warning us that the actual post appears _below_ the
signature.  That hardly seems sensible to me.  It's not cute, it's
moronic.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Wed, 07 Jul 1999 03:48:05 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: something similar to 'creat' in C
Message-Id: <3782cc9b.253186889@news.nikoma.de>

On Tue, 6 Jul 1999 21:57:21 -0400, rjk@linguist.dartmouth.edu (Ronald
J Kimball) wrote:

>Alan Curry <pacman@defiant.cqc.com> wrote:
>
>> Aww, how cute, a guidepost warning us that this post is actually written in a
>> sensible order.
>
>No, a guidepost warning us that the actual post appears _below_ the
>signature.  That hardly seems sensible to me.  It's not cute, it's
>moronic.

It wasn't a signature -- it didn't have space after the sigdashes (the
way rjk's does, for example).

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.net>


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

Date: Wed, 7 Jul 1999 13:13:59 +1000
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Re: sorting hashes with some identical fields
Message-Id: <7lugit$3ia21@atbhp.corpmel.bhp.com.au>

Try this (tested):

#!perl -w

use integer;
use strict;

my(@field, %data, @sortedData, $key);

$key = 0;

while (<DATA>)
{
 chomp;
 $key++;
 @field     = split(/:/, $_);
 $data{"$field[0].$key"} = $_; # Make sort keys unique. You overwrite.
}

@sortedData = map{$data{$_};} sort { $data{$a} cmp $data{$b} } keys(%data);

for (@sortedData)
{
 print "Sorted: $_\n";
}

__END__
telecom:wrwerwer344:blobby:12334343434:12-12-99:1of3
Ian Mortimer:12-12-99:rusa.66:XPM12:XPM10:GPO:Original::lardy:2of3
telecom:wrwerwer344:blobby:12334343434:12-12-99:3of3






--
Ron Savage
Office (preferred): Savage.Ron.RS@bhp.com.au
Home: rpsavage@ozemail.com.au
http://www.ozemail.com.au/~rpsavage
Ian Mortimer wrote in message <3781F4D3.8E04682@nortelnetworks.com>...
[snip]




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

Date: Wed, 07 Jul 1999 07:37:13 -0800
From: Ron Arquilevich <tarsi@cs.ucla.edu>
Subject: Stability Question
Message-Id: <3783741D.43E374E7@cs.ucla.edu>

I'm looking for a server to host our website and was wondering if anyone

has experience with MacPerl. People have told me it's not very stable
but I want some second opinions. Also, how much if any script
modification will be needed to run MacPerl?





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

Date: Wed, 07 Jul 1999 15:47:00 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Stability Question
Message-Id: <378372bb.509649@news.skynet.be>

Ron Arquilevich wrote:

>I'm looking for a server to host our website and was wondering if anyone
>has experience with MacPerl. People have told me it's not very stable
>but I want some second opinions. Also, how much if any script
>modification will be needed to run MacPerl?

Oh yes it's pretty stable. But, IMO, a Mac+MacPerl isn't that good an
idea for a web server. Main reason is that only *one* CGI script can be
run at a time. MacPerl sequentializes the requests. (BTW if you're
serious about this, check out the difference between CGI and ACGI).
Besides, Macs are pretty expensive machines.

If you want a cheap and good solution, get a (cheap) PC, install Linux
or FreeBSD, and Apache. Lots cheaper, far more stable (the OS), and
fast. Plus, because it allows multiple accesses at the same time, it
scales better.

BTW there are several active MacPerl mailing lists, see
<www.macperl.com> for how to subscribe.

	Bart.


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

Date: Wed, 7 Jul 1999 10:14:09 +0100
From: "James A. Duncan" <j@mesduncan.co.uk>
Subject: Subroutines in a package
Message-Id: <37831af1.0@news.proweb.co.uk>

Is there any method of generating a list of all the subroutines in a
package?  I've been trying in vain to come up with a way myself, and I
figure I've got to the point where I need a little outside assistance :-)

Regards,
James.

--
James A. Duncan ~ WebFusion Systems Administrator
j@mesduncan.co.uk ~ james@webfusion.co.uk
http://j@mesduncan.co.uk http://www.hawk.igs.net/~jduncan





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

Date: Wed, 07 Jul 1999 10:42:29 GMT
From: marcel.grunauer@lovely.net (Marcel)
Subject: Re: Subroutines in a package
Message-Id: <3784244f.2993854@enews.newsguy.com>

On Wed, 7 Jul 1999 10:14:09 +0100, "James A. Duncan"
<j@mesduncan.co.uk> wrote:

>Is there any method of generating a list of all the subroutines in a
>package?  I've been trying in vain to come up with a way myself, and I
>figure I've got to the point where I need a little outside assistance :-)

Check out Tom Christiansen's pmtools kit.

pmtools are at http://language.perl.com/misc/pmtools-1.00.tar.gz


Marcel
-- 
perl -e 'print unpack(q$u$,q$82G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R$)'


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

Date: Wed, 7 Jul 1999 14:04:50 +0100
From: "James A. Duncan" <j@mesduncan.co.uk>
Subject: Re: Subroutines in a package
Message-Id: <37835104.0@news.proweb.co.uk>

Marcel wrote in message <3784244f.2993854@enews.newsguy.com>...
>pmtools are at http://language.perl.com/misc/pmtools-1.00.tar.gz


I've already gone down that route.  I'm looking for a method to get the
subnames without actually having to open a file and parse the text.  But
thanks for the pointer,  if all else fails....

Regards,
James.

--
James A. Duncan ~ Systems Administrator
james@webfusion.co.uk ~ j@mesduncan.co.uk
www.hawk.igs.net/~jduncan  ~ http://j@mesduncan.co.uk





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

Date: 07 Jul 1999 15:46:12 +0100
From: Olivier Dehon <dehon_olivier@jpmorgan.com>
Subject: Re: Subroutines in a package
Message-Id: <iuxr9mkcybv.fsf@in-csg58.uk.jpmorgan.com>

"James A. Duncan" <j@mesduncan.co.uk> writes:

> I've already gone down that route.  I'm looking for a method to get the
> subnames without actually having to open a file and parse the text.  But
> thanks for the pointer,  if all else fails....

Do you want to dump the CODE values from the module's stash?

For instance, list all the preloaded functions from the CGI module:

 use CGI;
 print join "\n",
       grep {local *alias = $CGI::{$_}; defined (&alias)} (keys %CGI::);

Hope this helps,

-Olivier


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

Date: 7 Jul 1999 08:57:55 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Subroutines in a package
Message-Id: <37836af3@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, "James A. Duncan" <j@mesduncan.co.uk> writes:
:I've already gone down that route.  I'm looking for a method to get the
:subnames without actually having to open a file and parse the text.  

If you do not look to see what's there, you cannot know what's there.
There's just no way around that.  You can do your own parsing or have
the Perl compiler do the parsing for you, but at some point, *someone*
has to read the code.

Remember that the mapping between packages and files is not always
one-to-one.

You could have one package that's accessed from many different files.

    # file1
    package X;
    $a = 1;
    sub fred {}

    # file2
    package X;
    $a = 2;
    sub barney {}

You could have one file that itself accesses many different packages.

    # file1

    package X;
    $a = 1;
    sub fred {}

    package Y;
    $a = 2;
    sub fred {}

You could have even more startling combinations.  And I haven't
even mentioned lexicals yet.  Well, up until then. :-)

--tom
-- 
If I had only known, I would have been a locksmith.  --Albert Einstein


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

Date: Wed, 7 Jul 1999 09:39:28 +0200
From: "Rainer Kraly" <rkraly@netway.at>
Subject: Telnet Query
Message-Id: <7lv06u$sbn$1@news.netway.at>

I try to establish a Telnet connection with perl using socket (don't want to
use Comm.pl) but i only get undefined pattern back.
Queries to FTP, SMTP Ports work fine. I guess the problem is Telnet using a
TTY VT100 .
Can anybody show me how to define the TTY in Perl for Telnet

Thx :-) Rainer




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

Date: Tue, 06 Jul 1999 21:49:55 GMT
From: garthwebb@yahoo.com
Subject: Re: time question
Message-Id: <7lttlv$q8l$1@nnrp1.deja.com>

In article <MPG.11d9b7a4b52d3877989c28@nntp.hpl.hp.com>,
  lr@hpl.hp.com (Larry Rosler) wrote:
> Wrong.  It is the number of seconds since 1970-01-01 00:00:00 UTC,
> taking no account of leap seconds (which means it is actually the
number
> of seconds since about 1970-01-01 00:00:29 TIA, but let's not get too
> far into that now :-).

Why doesn't localtime return this?  Where have I erred?

$ cat time.pl
#!/opt/bin/perl -w
use strict;

print scalar(localtime(0)), "\n";  # Zero seconds since the epoch.
print scalar(localtime(1)), "\n";  # One second since the epoch.
$ perl time.pl
Wed Dec 31 16:00:00 1969
Wec Dec 31 16:00:01 1969



Garth


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


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

Date: Tue, 06 Jul 1999 22:43:35 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: time question
Message-Id: <slrn7o559t.5n.alastair@calliope.demon.co.uk>

garthwebb@yahoo.com <garthwebb@yahoo.com> wrote:
>In article <MPG.11d9b7a4b52d3877989c28@nntp.hpl.hp.com>,
>  lr@hpl.hp.com (Larry Rosler) wrote:
>> Wrong.  It is the number of seconds since 1970-01-01 00:00:00 UTC,
>> taking no account of leap seconds (which means it is actually the
>number
>> of seconds since about 1970-01-01 00:00:29 TIA, but let's not get too
>> far into that now :-).
>
>Why doesn't localtime return this?  Where have I erred?
>
>Wed Dec 31 16:00:00 1969

I think I recall a portability alert in this newsgroup a few days ago. NT is
'different'.


-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Wed, 7 Jul 1999 01:20:02 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: time question
Message-Id: <Dbwg3.756$lN4.4745@news1.online.no>


<garthwebb@yahoo.com> wrote in message news:7lttlv$q8l$1@nnrp1.deja.com...
> > Wrong.  It is the number of seconds since 1970-01-01 00:00:00 UTC,
> Why doesn't localtime return this?  Where have I erred?
>
> $ cat time.pl
> #!/opt/bin/perl -w
> use strict;
>
> print scalar(localtime(0)), "\n";  # Zero seconds since the epoch.
> print scalar(localtime(1)), "\n";  # One second since the epoch.
> $ perl time.pl
> Wed Dec 31 16:00:00 1969
> Wec Dec 31 16:00:01 1969

My guess would be that it is a timezone thing. If you live near the american
westcoast (GMT -0800 (is that PST?)) then this time /is/ 1970-01-01 00:00:00
GMT

--
Trond Michelsen





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

Date: 6 Jul 1999 18:45:33 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: time question
Message-Id: <slrn7o5588.tch.abigail@alexandra.delanet.com>

garthwebb@yahoo.com (garthwebb@yahoo.com) wrote on MMCXXXV September
MCMXCIII in <URL:news:7lttlv$q8l$1@nnrp1.deja.com>:
@@ 
@@ Why doesn't localtime return this?  Where have I erred?


I'd say you missed the meaning of 'local'.


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


  -----------== 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: 6 Jul 1999 18:47:31 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: time question
Message-Id: <slrn7o55bu.tch.abigail@alexandra.delanet.com>

Alastair (alastair@calliope.demon.co.uk) wrote on MMCXXXV September
MCMXCIII in <URL:news:slrn7o559t.5n.alastair@calliope.demon.co.uk>:
@@ garthwebb@yahoo.com <garthwebb@yahoo.com> wrote:
@@ >
@@ >Why doesn't localtime return this?  Where have I erred?
@@ >
@@ >Wed Dec 31 16:00:00 1969
@@ 
@@ I think I recall a portability alert in this newsgroup a few days ago. NT is
@@ 'different'.


Because they all are located in the Rocky Mountain, right?



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== 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, 6 Jul 1999 17:03:17 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: time question
Message-Id: <MPG.11ec39235a375dea989c67@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <7lttlv$q8l$1@nnrp1.deja.com> on Tue, 06 Jul 1999 21:49:55 
GMT, garthwebb@yahoo.com <garthwebb@yahoo.com> says...
+ In article <MPG.11d9b7a4b52d3877989c28@nntp.hpl.hp.com>,
+   lr@hpl.hp.com (Larry Rosler) wrote:
+ > Wrong.  It is the number of seconds since 1970-01-01 00:00:00 UTC,
+ > taking no account of leap seconds (which means it is actually the
+ > numberof seconds since about 1970-01-01 00:00:29 TIA, but let's not 
+ > get too far into that now :-).
+ 
+ Why doesn't localtime return this?  Where have I erred?
+ 
+ $ cat time.pl
+ #!/opt/bin/perl -w
+ use strict;
+ 
+ print scalar(localtime(0)), "\n";  # Zero seconds since the epoch.
+ print scalar(localtime(1)), "\n";  # One second since the epoch.
+ $ perl time.pl
+ Wed Dec 31 16:00:00 1969
+ Wec Dec 31 16:00:01 1969

You have erred by not considering that you are in the Pacific timezone 
which, in winter, is 8 hours behind UTC.  Try using gmtime() instead of 
localtime().

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


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

Date: Tue, 6 Jul 1999 17:57:33 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: time question
Message-Id: <MPG.11ec45dd557e818989c6a@nntp.hpl.hp.com>

In article <7loqle$qno$1@pegasus.csx.cam.ac.uk> on 4 Jul 1999 23:27:42 
GMT, Chris Thompson <nospam@nospam.nospam> says...
> In article <MPG.11d9b7a4b52d3877989c28@nntp.hpl.hp.com>,
> Larry Rosler <lr@hpl.hp.com> wrote:
 ...
> >Wrong.  It is the number of seconds since 1970-01-01 00:00:00 UTC, 
> >taking no account of leap seconds (which means it is actually the number 
> >of seconds since about 1970-01-01 00:00:29 TIA, but let's not get too 
> >far into that now :-).
> 
> But why not? Because you can't justify that 29 seconds, not nohow, eh? :-)
> 
> The charitable interpretation is that you've been asleep in a cave for the
> last 5 years and have missed the last 3 leap seconds. TAI-UTC has been 32 
> seconds since 1999-01-01 00:00:00 UTC.

My charitable interpretation is that you don't know the meaning of the 
word 'about'.

> And that *is* TAI (Temps Atomique International) by the way, not TIA, which
> stands for "Thanks In Advance" :-)

You're welcome.

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


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

Date: Wed, 7 Jul 1999 10:05:57 -0400
From: Damm Dashing <gjmorey@uwaterloo.ca>
Subject: Timer on a web-page..
Message-Id: <Pine.SOL.3.96.990707100351.11125J-100000@agnesi.math.uwaterloo.ca>

Dear Folks,

I'm looking to have a countdown timer on a web-page.  The difficulty is
that I'm looking for the page to update when either the timer hits 0 or
the user inputs and hits "Submit".

Is there an easy way to do this?  I can spawn a child, but how do I get
that info (the countdown) to output to the page?

Please reply via e-mail.  Thanks in advance!

Greg.



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

Date: Wed, 7 Jul 1999 17:04:25 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Timer on a web-page..
Message-Id: <W%Jg3.211$hg4.1844@news1.online.no>


Damm Dashing <gjmorey@uwaterloo.ca> wrote in message
news:Pine.SOL.3.96.990707100351.11125J-100000@agnesi.math.uwaterloo.ca...
> Dear Folks,
>
> I'm looking to have a countdown timer on a web-page.  The difficulty is
> that I'm looking for the page to update when either the timer hits 0 or
> the user inputs and hits "Submit".
>
> Is there an easy way to do this?  I can spawn a child, but how do I get
> that info (the countdown) to output to the page?
>
> Please reply via e-mail.  Thanks in advance!

What you are looking for is called Javascript. There is a newsgroup for
javascript-related questions:

comp.lang.javascript

--
Trond Michelsen





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

Date: Tue, 6 Jul 1999 23:35:37 +0100
From: "Tony Lloyd" <rtlloyd@easynet.co.uk>
Subject: Unbelievably simple question
Message-Id: <7lu0f5$1h1h$1@quince.news.easynet.net>

I really, really, don't want to have to learn PERL.  Hopefully if some kind
soul can answer this question I can go back to playing about with HTML.


I am trying to amend a PERL script that mails (using sendmail) the input on
a form to a specified address.  I want it to also cc the input to my email
address, rtlloyd@easynet.co.uk. so that it'll copy the mail to me.


The bit of the script which sends the mail starts

 open(MAIL,"|$mailprog -t");
 print MAIL "To: $FORM{'recipient'}\n";

this script works fine but if I try to add (using DOS "Edit"):-

print MAIL "Cc: rtlloyd@easynet.co.uk\n;

the whole thing collapses (HTTP 500 - Internal server error).  What can I be
doing wrong?

Thanks

Tony Lloyd






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

Date: Tue, 06 Jul 1999 17:03:26 -0600
From: Arne Jamtgaard <arnej@fc.hp.com>
Subject: Re: Unbelievably simple question
Message-Id: <37828B3D.5499@fc.hp.com>

Tony Lloyd wrote:

> I really, really, don't want to have to learn PERL.  Hopefully if 
> some kind soul can answer this question I can go back to playing 
> about with HTML.

> I am trying to amend a PERL script that mails (using sendmail) the
> input on a form to a specified address.  I want it to also cc the
> input to my email address, rtlloyd@easynet.co.uk. so that it'll copy
> the mail to me.

> The bit of the script which sends the mail starts

>  open(MAIL,"|$mailprog -t");
>  print MAIL "To: $FORM{'recipient'}\n";

> this script works fine but if I try to add (using DOS "Edit"):-

> print MAIL "Cc: rtlloyd@easynet.co.uk\n;

> the whole thing collapses (HTTP 500 - Internal server error).  
> What can I be doing wrong?

Well, if what you put here is accurate, you're missing a closing
quote.

HTH!
Arne


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

Date: 6 Jul 1999 18:56:31 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Unbelievably simple question
Message-Id: <slrn7o55sq.tch.abigail@alexandra.delanet.com>

Tony Lloyd (rtlloyd@easynet.co.uk) wrote on MMCXXXV September MCMXCIII in
<URL:news:7lu0f5$1h1h$1@quince.news.easynet.net>:
'' I really, really, don't want to have to learn PERL.

I really, really, don't want to learn Java. That's why I don't post
in the Java group with a problem I want to solve.

''                                                      Hopefully if some kind
'' soul can answer this question I can go back to playing about with HTML.

Please do! There's no need to use Perl if you don't want to! Noone is
forcing you to learn it. Go play with HTML!

'' I am trying to amend a PERL script that mails (using sendmail) the input on
'' a form to a specified address.  I want it to also cc the input to my email
'' address, rtlloyd@easynet.co.uk. so that it'll copy the mail to me.

But that's difficult! And you really, really don't want to learn Perl,
so why bother? Go play with HTML!

'' the whole thing collapses (HTTP 500 - Internal server error).  What can I be
'' doing wrong?

Oh, lots of things; I spotted at least 2 bugs. If you knew a little Perl,
it would be easy to find out. But since you really, really don't want
to learn Perl, why should we bother telling you? You might learn some
Perl, and that's something you really, really don't want. We wouldn't
want to force you into something you really, really don't want. Go play
with HTML! That's way more fun!



Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


  -----------== 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: Wed, 7 Jul 1999 12:06:00 +1000
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Re: Unbelievably simple question
Message-Id: <7lucje$3ia19@atbhp.corpmel.bhp.com.au>

If you're using sendmail, you are probably on a Unix box.

If you're using DOS edit, you are probably on a DOS box.

Hmmm.

So, perhaps you should FTP the edited file in ASCII mode rather than Binary
mode from the DOS box to the Unix box (after fixing any other bugs...).


--
Ron Savage
Office (preferred): Savage.Ron.RS@bhp.com.au
Home: rpsavage@ozemail.com.au
http://www.ozemail.com.au/~rpsavage
Tony Lloyd wrote in message <7lu0f5$1h1h$1@quince.news.easynet.net>...
>I really, really, don't want to have to learn PERL.  Hopefully if some kind
>soul can answer this question I can go back to playing about with HTML.
>
>
>I am trying to amend a PERL script that mails (using sendmail) the input on
>a form to a specified address.  I want it to also cc the input to my email
>address, rtlloyd@easynet.co.uk. so that it'll copy the mail to me.
>
>
>The bit of the script which sends the mail starts
>
> open(MAIL,"|$mailprog -t");
> print MAIL "To: $FORM{'recipient'}\n";
>
>this script works fine but if I try to add (using DOS "Edit"):-
>
>print MAIL "Cc: rtlloyd@easynet.co.uk\n;
>
>the whole thing collapses (HTTP 500 - Internal server error).  What can I
be
>doing wrong?
>
>Thanks
>
>Tony Lloyd
>
>
>
>




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

Date: Wed, 7 Jul 1999 02:41:34 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: Unbelievably simple question
Message-Id: <7luqv5$9ds$1@plonk.apk.net>


Abigail wrote in message ...
>Tony Lloyd (rtlloyd@easynet.co.uk) wrote on MMCXXXV September MCMXCIII in
><URL:news:7lu0f5$1h1h$1@quince.news.easynet.net>:
>'' I really, really, don't want to have to learn PERL.


We really don't want to tell you about the 2 bugs in your Cc: line because
you don't want to have to learn PERL.  We don't want to teach you either.


>'' the whole thing collapses (HTTP 500 - Internal server error).  What can
I be
>'' doing wrong?


Not wanting to learn PERL is one of the biggest things you are doing wrong
and then coming here and wanting us to fix your problems without even taking
a stab at them yourself.

Heck, you haven't even RTM or RTF.

Jody




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

Date: 7 Jul 1999 02:18:30 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Unexpected behavior of Perl classes
Message-Id: <7luddm$gss@dfw-ixnews12.ix.netcom.com>

biagio@my-deja.com wrote:
: package Person;
: require Exporter;
: 
: sub new {
: 	my $class = shift;
: 	my $self = {};
: 	my ($name, $age) = @_;
: 	$self{NAME} = $name;
: 	$self{AGE} = $age;

Others have pointed out the problem here.

: 	bless $self;

This is a bad habit to get into, because you're creating a class that 
can't be properly inherited from (your objects will always be blessed 
into Person rather than any subclass you define).

  bless $self, $class;

is preferable.

: 	return $self;
: }


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

Date: Wed, 07 Jul 1999 12:06:32 +0800
From: Tanya <tanya@i-cable.com>
Subject: unzip
Message-Id: <3782D248.12ED5DAC@i-cable.com>

after uploaded a zipped file by a broswer
how can i unzip the file ?

system("unzip filenhame.zip");  #### is that right #####

please help and reply tp tanya@i-cable.com
thx



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

Date: 6 Jul 1999 23:43:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: unzip
Message-Id: <slrn7o5mmj.tch.abigail@alexandra.delanet.com>

Tanya (tanya@i-cable.com) wrote on MMCXXXVI September MCMXCIII in
<URL:news:3782D248.12ED5DAC@i-cable.com>:
!! after uploaded a zipped file by a broswer
!! how can i unzip the file ?
!! 
!! system("unzip filenhame.zip");  #### is that right #####


And that doesn't work because ... ?



Abigail
-- 
Use the Luke, force!


  -----------== 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, 6 Jul 1999 16:00:48 +0100
From: "Torcuato" <torcu99@teleline.es>
Subject: RE: unzip
Message-Id: <7lvmdh$303@telerad.teleline.es>


Tanya <tanya@i-cable.com> escribió en el mensaje de noticias
3782D248.12ED5DAC@i-cable.com...
> after uploaded a zipped file by a broswer
> how can i unzip the file ?
>
> system("unzip filenhame.zip");  #### is that right #####
>
> please help and reply tp tanya@i-cable.com
> thx
> Use winzip (¿really you don´t knew it?)




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

Date: Wed, 7 Jul 1999 09:24:24 -0700
From: "Jeremiah and Veronica Adams" <adams1015@worldnet.att.net>
Subject: UPS shipping code???
Message-Id: <7lvntt$oph$1@bgtnsc02.worldnet.att.net>

Does anyone know where I can find code that can accesss up shipping costs by
weight and zip code?




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

Date: Wed, 07 Jul 1999 15:08:37 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: UPS shipping code???
Message-Id: <slrn7o6psr.1k7.*@dragons.duesouth.net>

Jeremiah and Veronica Adams" <adams1015@worldnet.att.net>, thinking with
his hands, posted the following to comp.lang.perl.misc: 
: Does anyone know where I can find code that can accesss up shipping costs by
: weight and zip code?

http://www.ups.com

If you wish to automate it, look into the LWP module.

HTH,

--Matthew


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

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 64
************************************


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