[7069] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 694 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 2 11:18:18 1997

Date: Wed, 2 Jul 97 08:00:33 -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           Wed, 2 Jul 1997     Volume: 8 Number: 694

Today's topics:
     Arrays of filehandles (Non-OOP) matthew.freake@smlawpub.co.uk
     Bug in sort ?? <rolf@hallo.ch>
     Re: Checkout Perlchat <admin@-no-spam-chathub.com>
     Re: Compression in Perl (Quentin Fennessy)
     Re: Compression in Perl <rootbeer@teleport.com>
     error message: panic: pp_iter (Marek Rouchal)
     Re: error message: panic: pp_iter (Marek Rouchal)
     exec perl script in html file <dantin@icp.grenet.fr>
     find a local site tree <dantin@icp.grenet.fr>
     Finding users hostname <dancan@mozcom.com>
     How can I get 'expect' functionality with perl? (Tarek_Rogers)
     Re: How can I get 'expect' functionality with perl? (Jean-Damien Durand)
     Re: how define random integer? <ajohnson@gpu.srv.ualberta.ca>
     Re: how define random integer? <ed@darkstar>
     Re: MS-DOS port of the Perl programming language <jhi@alpha.hut.fi>
     Re: MS-DOS port of the Perl programming language (M. muPe)
     No output <dkubilo@oxnardsd.org>
     Perl 5.004.01 Win32 Version & ODBC <jbkim@cnt.co.kr>
     Perl 5.004_1 on SCO 5 <dbadm@rgw-express.de>
     Perl, Oracle, CGI, WWW markus@netrail.net
     Problem with i/o file... <serginho@alpha.hydra.com.br>
     Re: Problem with i/o file... <sfairey@adc.metrica.co.uk>
     Re: recursion (Honza Pazdziora)
     Sending email form perl via a HTML Page (Jim Hribnak)
     Re: Sorting Array <sfairey@adc.metrica.co.uk>
     String to integer <e.christensen@netjob.dk>
     Re: Subroutines as arguments problem <dwc3q@mamba.cs.Virginia.EDU>
     Re: Subroutines as arguments problem <dwc3q@mamba.cs.Virginia.EDU>
     UUDECODE Mailer program in Perl 5 (Bart D'haenens)
     Re: When was PERL created? (Jimmy Aitken)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 02 Jul 1997 08:03:18 -0600
From: matthew.freake@smlawpub.co.uk
Subject: Arrays of filehandles (Non-OOP)
Message-Id: <867848009.25282@dejanews.com>

I've consulted the Perl faq regarding creating an array of files handles
and the suggested method is Object Oriented. Given that TMTOWTDI, is there
any non Object Oriented means to achieve the same result.
Failing that it looks like it might be time for me to finally learn OOP.

Many thanks



Matt Freake
-------------------------------------------------------------------
The Vermin Mint are privileged to present the first ever fully self
authorised Elvis Presley Dambusters Clock Plate of TUTANKHAMUN!
-------------------------------------------------------------------

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Wed, 02 Jul 1997 11:40:23 +0200
From: Rolf Hatt <rolf@hallo.ch>
Subject: Bug in sort ??
Message-Id: <33BA2207.1F82C9AC@hallo.ch>

Hi,
here a little sort program:

#!/usr/local/bin/perl
sub numSort { $a <=> $b; }
open( FH, "/etc/freeIP" );
@in = <FH>;
close FH;
@out = sort numSort @in;
print @out;

in the file "freeIP" are 1493 entries with IP-Addresses. After sorting
them the first and the last entry (of the sorted order) are exactly in
the middle of the new file !!
Is it my fault or has sort a bug ?

Greetings
Rolf Hatt
HALLO Internet AG
Switzerland




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

Date: Wed, 02 Jul 1997 01:44:55 -0700
From: Webmaster <admin@-no-spam-chathub.com>
Subject: Re: Checkout Perlchat
Message-Id: <33BA1507.554B@-no-spam-chathub.com>

Jonas Thvrnvall wrote:
> 
> Hello!
> Please have a look at http://www.algonet.se/chat/jtchat.htm
> I try to do a Pel chat that will work without server socket connection.
> I just upload to a file that can be read just like a guestbook i have
> Implemented private messages, optional images, and login check, and
> checkcode mailing and it will be quite configurable,
> 
> The problem is!
> that i can't be sure that people will use the logout button, so i
> looking for a way to see if the window is closed. I've tryed
> Javascript if self.closed {submit.form()} but it won't work cause the
> form is not there anymore (Another idea is to check lastmessage in the
> chatroom files). Do anyone have a real smart idea how to solve this i
> woul be glade.
> 
> Jonas T

I tried the URL, and got 404 errors all the way down the /chat path..
only the actual server's main page worked?. 

To reply via email. remove the -no-spam- 
-- 
* Chatmaster/Admin Chat Hub:
http://www.chathub.com - http://chat.nstate.net
E-Mail Contact: 
chatmaster@chathub.com, webmaster@chathub.com, sales@chathub.com, 
info@chathub.com, admin@chathub.com, chatmaster@nstate.net  
* Webmaster Northstate Net:
http://www.nstate.net
E-Mail Contact: 
webmaster@nstate.net


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

Date: 2 Jul 1997 14:00:53 GMT
From: quentin@remington.amd.com (Quentin Fennessy)
Subject: Re: Compression in Perl
Message-Id: <5pdmul$929$1@amdint2.amd.com>

In article <33B9908A.64F2@styx.or.fedex.com>,
Igor Vulfson  <igorv@styx.or.fedex.com> wrote:
>Does anyone have a code that would compress a string of upper case
>characters into a shorter string? - will need to decompress later!

Check out CPAN - there is a Compress::Zlib module that interfaces
with Infozip.


-- 
Quentin Fennessy			AMD, Austin Texas


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

Date: Wed, 2 Jul 1997 07:53:26 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Igor Vulfson <igorv@styx.or.fedex.com>
Subject: Re: Compression in Perl
Message-Id: <Pine.GSO.3.96.970702075126.18446B-100000@kelly.teleport.com>

On Tue, 1 Jul 1997, Igor Vulfson wrote:

> Does anyone have a code that would compress a string of upper case
> characters into a shorter string? - will need to decompress later!

There are many compression algorithms, depending upon your needs. But any
publicly-available modules should be on CPAN. Tell us more if you need
something more. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 2 Jul 1997 07:58:55 GMT
From: marek@buffalo.hl.siemens.de (Marek Rouchal)
Subject: error message: panic: pp_iter
Message-Id: <5pd1nv$cj1$1@mosquito.HL.Siemens.DE>
Keywords: pp_iter panic foreach

Hello,

I've came across a mysterious error message while executing a
~1000 lines sized perl script (perl5.00305 and perl5.004 on
solaris 2.5.1).
Whenever the script executes a certain branch of an if-else 
contruct inside a foreach-loop, the following error message
appears and the script stops, regardless of unprocessed items
in the foreach loop.

> panic: pp_iter at myscript line 301 (#1)
>     
>    (P) The foreach iterator got called in a non-loop context frame.
>     
> Uncaught exception from user code:
>         panic: pp_iter at myscript line 301.

If certain conditions are met so that the mentioned block in the 
if-else construct (the other blocks are not substantially
different) is NOT executed, all foreach-items are processed
correctly without an error. I am using 'strict' and 'diagnostics'.
Can anybody give me a hint what may be wrong here? The manual
(perldiag) says that (P)-error messages shouldn't ever appear.
Any help is greatly appreciated!

Kind regards,

Marek Rouchal

+--------------------------------------------------------------------+
  Marek Rouchal
  SIEMENS AG               Phone : +49 89/636-25849
  HL CAD SYS               Fax   : +49 89/636-23650
  Balanstr. 73             mailto:Marek.Rouchal@hl.siemens.de
  81541 Muenchen
+--------------------------------------------------------------------+


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

Date: 2 Jul 1997 10:23:58 +0200
From: marek@buffalo.hl.siemens.de (Marek Rouchal)
Subject: Re: error message: panic: pp_iter
Message-Id: <5pd36u$d2h@buffalo.hl.siemens.de>

Hi again!

I've reworked the code a little bit - now it works. The construct was as follows:
(replace <<...>> with some code that makes sense ;-)

foreach(@a) {
  if(<<cond1>>) {
    <<some commands>>
    goto label;
    }
  elsif(<<cond2>>) {
    <<some commands>>
    goto label;
    }
  else {
    <<some commands>>
    label:
    <<other commands>>
    }
  }

If condition 1 is met, the foreach loop fails with this error message:

> panic: pp_iter at myscript line 301 (#1)
>
>    (P) The foreach iterator got called in a non-loop context frame.
>
> Uncaught exception from user code:
>         panic: pp_iter at myscript line 301.

If condition 2 is met or neither of 1 or 2, everything works ok.

Apart from being rather poor programming style (yes, I know :-| ), gotos did
work as expected in other contexts. Is this a bug or just too silly a thing to
do so nobody ever came across this problem?

Kind regards,

Marek Rouchal

+--------------------------------------------------------------------+
  Marek Rouchal
  SIEMENS AG               Phone : +49 89/636-25849
  HL CAD SYS               Fax   : +49 89/636-23650
  Balanstr. 73             mailto:Marek.Rouchal@hl.siemens.de
  81541 Muenchen
+--------------------------------------------------------------------+



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

Date: Wed, 02 Jul 1997 15:25:45 +0200
From: Joelle D'Antin & Nicolas Gregoire <dantin@icp.grenet.fr>
Subject: exec perl script in html file
Message-Id: <33BA56D9.42B2@icp.grenet.fr>

We know that it's easy to exec a script with a form,
but we want that the script is exec when the html file is loaded.
Because we want to know how long user stays on a page,the script records
filename and time.

I hope you understand my frenchy-english.

thanks


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

Date: Wed, 02 Jul 1997 11:35:38 +0200
From: Joelle D'Antin & Nicolas Gregoire <dantin@icp.grenet.fr>
Subject: find a local site tree
Message-Id: <33BA20EA.4704@icp.grenet.fr>

hi, 
someone can help me to find a script which can
make(or draw) a tree of a local web site????

I USE PERL 5.0001

thanks


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

Date: Wed, 02 Jul 1997 21:23:48 +0800
From: danny cantil <dancan@mozcom.com>
Subject: Finding users hostname
Message-Id: <33BA5664.3651@mozcom.com>

Hi;

Anyone know a way from Perl to figure out the hostname of the users
accessing your page? I've been maintaining a guestbook and graffiti wall
of sorts and have
traced some attempts to splash obscene entries on both pages ... 

I only get IP# with $ENV {'REMOTE_HOST'}...


Danny Cantil <dancan@mozcom.com>


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

Date: 2 Jul 1997 10:14:22 -0400
From: ftrogers@terrapin.netedge.com (Tarek_Rogers)
Subject: How can I get 'expect' functionality with perl?
Message-Id: <5pdnnu$bfd@terrapin.netedge.com>

Hello, although I'm fairly new using perl, it seems to offer more
power than tcl, and perlTk allows one to use the easy GUI builder
as well - but I've got a lot of expect scripts lying around for
controlling programs like telnet and ftp.  Is there a way in perl
to give me similar control?

thanx

ftrogers@netedge.com


-- 
____________________________________________________________________
   F. Tarek Rogers                          NetEdge Systems 
   Phone:     919-991-9202                  P.O. Box 14993
   E-Mail:    Tarek_Rogers@NetEdge.com      RTP, NC 27709-4993


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

Date: Wed, 2 Jul 1997 14:33:49 GMT
From: ddurand@hpplus04.cern.ch (Jean-Damien Durand)
To: ftrogers@terrapin.netedge.com (Tarek_Rogers)
Subject: Re: How can I get 'expect' functionality with perl?
Message-Id: <ECp4GD.G9u@news.cern.ch>


> Hello, although I'm fairly new using perl, it seems to offer more
> power than tcl, and perlTk allows one to use the easy GUI builder
> as well - but I've got a lot of expect scripts lying around for
> controlling programs like telnet and ftp.  Is there a way in perl
> to give me similar control?
> 
> thanx
> 
> ftrogers@netedge.com

  Have a look at Comm.pl (http://www.perl.com/CPAN/modules/by-module/Comm.pl).

  Cheers,                        Jean-Damien.
--
       *******************************************************
       *   Jean-Damien Durand (Jean-Damien.Durand@cern.ch)   *
       *         www : http://wwwcn.cern.ch/~ddurand/        *
       *******************************************************


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

Date: Tue, 01 Jul 1997 13:11:30 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: how define random integer?
Message-Id: <33B94852.2E31CE3D@gpu.srv.ualberta.ca>

St. Thomas wrote:
> 
> Hallo!
> 
> I have a simple Question:
> How can i define random integer or real in Perl
> 
> Thanks
> steffen

defining a random integer or number is rather
difficult in english or Perl or any language---however, 
if you just want to get a psuedo-random number 
assigned to a variable in Perl then you can look up the
rand() and srand() functions in the perlfunc manpage

regards
andrew


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

Date: Wed, 2 Jul 1997 09:00:10 -0500
From: Eduardo Cavazos <ed@darkstar>
Subject: Re: how define random integer?
Message-Id: <Pine.LNX.3.96.970617204107.549A-100000@darkstar>



On Tue, 1 Jul 1997, Tom Phoenix wrote:

> On Tue, 1 Jul 1997, St. Thomas wrote:
> 
> > How can i define random integer or real in Perl
> 
> You can use the rand() function, possibly along with int(). Both are
> documented in perlfunc(1). If you don't find what you need there, ask
> again. Hope this helps!
> 
> -- 
> Tom Phoenix           http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
> Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
> 
> 
> 

If you'll be calling the rand function multiple times, then you should
also call srand. Call srand only one time like at the top of your program.

Eduardo Cavazos




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

Date: 02 Jul 1997 09:55:20 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: MS-DOS port of the Perl programming language
Message-Id: <oeeen9irlif.fsf@alpha.hut.fi>


: Get NEW MS-DOS port of the Perl programming language Shareware As It's
: Written!  The latest and greatest MS-DOS port of the Perl programming
: language shareware and freeware as soon as it's created!  We download
: new programs DAILY (10 a.m. EST) from more than 300 sites all over the
: world.
:
: Get the latest at:
: 
: http://www.jumbo.com/pages/programming/dos/perl/
: http://www.jumbo.com/pages/programming/mac/languages/

This is not true.  These are not the latest.  1994 is not recent.
You do not carry Perl 5 at all, only Perl 4s.

Use rather the Comprehensive Perl Archive Network, either
use directly the

	http://www.perl.com/CPAN/ports/msdos/perl5/dosperl.zip

or use the OS/2 port (yes, you can run OS/2 executables just fine in
MS-DOS).

	http://www.perl.com/CPAN/ports/msdos/dosperlp.txt

I do not myself do MS-DOS but I have been lead to understand
that the latter is actually a better way.

P.S. If somebody rillyrilly wants to use the Old and Ancient Perl 4s
     (Perl 4 is Officially Unsupported, BTW), CPAN has them too:
     http://www.perl.com/CPAN/ports/msdos/perl4/
     and their instructions
     http://www.perl.com/CPAN/ports/msdos/dosperl2.txt

-- 
$jhi++; # http://www.iki.fi/~jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

Date: Wed, 02 Jul 1997 15:22:08 GMT
From: mupe@desk.nl (M. muPe)
Subject: Re: MS-DOS port of the Perl programming language
Message-Id: <5pdoe1$hpm$1@news2.xs4all.nl>

In article <oeeen9irlif.fsf@alpha.hut.fi>, Jarkko Hietaniemi <jhi@alpha.hut.fi> wrote:
>
>: Get NEW MS-DOS port of the Perl programming language Shareware As It's
>: Written!  The latest and greatest MS-DOS port of the Perl programming
>: language shareware and freeware as soon as it's created!  We download
>: new programs DAILY (10 a.m. EST) from more than 300 sites all over the
>: world.
>:
>: Get the latest at:
>: 
>: http://www.jumbo.com/pages/programming/dos/perl/
>: http://www.jumbo.com/pages/programming/mac/languages/
>
>This is not true.  These are not the latest.  1994 is not recent.
>You do not carry Perl 5 at all, only Perl 4s.
>
>Use rather the Comprehensive Perl Archive Network, either
>use directly the
>
>        http://www.perl.com/CPAN/ports/msdos/perl5/dosperl.zip
>
>or use the OS/2 port (yes, you can run OS/2 executables just fine in
>MS-DOS).
>
>        http://www.perl.com/CPAN/ports/msdos/dosperlp.txt
>
>I do not myself do MS-DOS but I have been lead to understand
>that the latter is actually a better way.
>

And ofcourse Perl Shareware?????  
Tss, advocating old freeware as shareware.

Mathilde


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

Date: Wed, 02 Jul 1997 06:43:02 -0800
From: Dan Kubilos <dkubilo@oxnardsd.org>
Subject: No output
Message-Id: <33BA68F5.6DC8@oxnardsd.org>

I have installed Selena Sol's Keyword Search script on my NCSA server
running on a Sun Sparc 1.

The script resides(as per instructions) in /<webserver>/cgi-bin/Search

When I run the script from the command line it kicks out perfect HTML

However when I call it from a web page I get an error 500.

The error_log shows

httpd:  script  produced no output.    ????

I have double checked permissions -- nothing.

Suggestions??


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

Date: 1 Jul 1997 09:11:54 GMT
From: "Kim jae-bong" <jbkim@cnt.co.kr>
Subject: Perl 5.004.01 Win32 Version & ODBC
Message-Id: <01bc85b4$c2b1a200$64a77fd2@pitecus>

$)CHello?


I hava some problem using Perl 5.004.01 Win32 Version & ODBC...

I have compiled 5.004.01 with MS VisualC++ 4.2...

That works very well...

But, I can't use Win32::ODBC module...

Config.pm Error...

I have replaced old version Config.pm & Dynaloader.pm ...

That works...

I wanna know WHY????

Please help me.....




					In KOREA

					Kim, Jae-bong






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

Date: Wed, 02 Jul 1997 12:58:58 +0200
From: Peter Eckhardt <dbadm@rgw-express.de>
Subject: Perl 5.004_1 on SCO 5
Message-Id: <33BA3472.F27@rgw-express.de>

I am just trying to compile perl5.004 on SCO 5. Everything
works (including Dyna Loading) except that the socket
module complains about missing definitions of
__inet_ntoa and __inet_aton. I can fix the problem
with __inet_aton by #undef HAS_ATON in the
ext/Socket/Socket.xs file. But thsi does not
cure the problem with __inet_ntoa.

I am using the SCO cc with elf enabled and dynamic loading.

Above problem occurs wether the modules is loaded dynamic or 
static.

Anyone compiled under SCO ?


Peter


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

Date: Wed, 02 Jul 1997 09:13:04 -0600
From: markus@netrail.net
Subject: Perl, Oracle, CGI, WWW
Message-Id: <867852177.29225@dejanews.com>

I know this subject is becoming trite, but I too am having trouble
connecting to an Oracle database. The database is setup on a VMS box,
which we want to access from an NT machine. This NT machine will also be
running Netscape Enterprise, so we will be using CGI to access the
database. I would prefer to use Perl and bypass the proprietary Pro*C
libraries if possible. Oraperl has not helped, so I am looking at a
Win32::ODBC solution. My question is concerning network access of the
database. Will I be able to connect to the Vax over TCP/IP and access the
database? If so, how would I go about connecting to it through Perl? Any
help, info, programs, etc. would be beneficial.

Thanks,
Mark

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: 2 Jul 1997 12:23:37 GMT
From: "Sergio Stateri Jr" <serginho@alpha.hydra.com.br>
Subject: Problem with i/o file...
Message-Id: <01bc86e3$24dea340$6875e7c8@Term104>

Hi! When I open a file for input and output, how can I do to read the lines
and append more lines ? I'm trying to use this :

open(SAIDA,"+<saida.dat");
@lines = <SAIDA>;
print SAIDA "new line";
close(SAIDA);

but, if my file has :
a
b
c

and I try to append "new line" at the end of the file (with the command
print "new line";), my file now have :
a
b
c
a
b
c
newline

   What's happenning ? Why Perl repeat all the line before to put the line
"new line" ?

   Thanks in advance!

-- 
--------------------------------------------
Sergio Stateri Jr
Sco Paulo (SP) - Brazil
e-mail: serginho@usa.net
--------------------------------------------


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

Date: Wed, 02 Jul 1997 15:06:17 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
To: Sergio Stateri Jr <serginho@alpha.hydra.com.br>
Subject: Re: Problem with i/o file...
Message-Id: <33BA6059.2F1C@adc.metrica.co.uk>

Sergio Stateri Jr wrote:
> 
> Hi! When I open a file for input and output, how can I do to read the lines
> and append more lines ? I'm trying to use this :
> 
> open(SAIDA,"+<saida.dat");
> @lines = <SAIDA>;
> print SAIDA "new line";
> close(SAIDA);
> 
> but, if my file has :
> a
> b
> c
> 
> and I try to append "new line" at the end of the file (with the command
> print "new line";), my file now have :
> a
> b
> c
> a
> b
> c
> newline
> 
>    What's happenning ? Why Perl repeat all the line before to put the line
> "new line" ?
> 
>    Thanks in advance!
> 
> --
> --------------------------------------------
> Sergio Stateri Jr
> Sco Paulo (SP) - Brazil
> e-mail: serginho@usa.net
> --------------------------------------------

I am assuming this is a small portion of your script.
Have you tried running the above as a script in its own right?
It works fine on my machine, are you sure you are not doing another
print to the file somewhere before closing it. Also what version of perl
are you running and on what OS ( not sure if it will matter but it is
always useful to know ).

Simon


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

Date: Wed, 2 Jul 1997 06:52:55 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: recursion
Message-Id: <adelton.867826375@aisa.fi.muni.cz>

Greg Land <gland@ccs.neu.edu> writes:

> I would like to know if anyone can help me do two things...
> 
> 1)Make the script "jump" through links as many levels as asked for by the user
> 2)The current setup requires you to type "http://www.xxx.xxx.xxx" instead of just "www.xxx.xxx.xxx"
> 
> 						Thanks in advance
> 
> 							Greg
> Here is the script:
> 
> use LWP::Simple;
> use HTML::Parse;
> use HTML::Element;
> use URI::URL;
> $num = 1;
> 
> if ($ARGV[0] eq "") {
> print ("Usage: http://<domain name>/<path>\n");
> print ("use \"SHORT\" as the argumennt not to expand the path to images\n")
> }
> 
> $html = get $ARGV[0];

$html = 'http:// . $html unless $html =~ m!^http://!;

### will do the point 2.

### for the point 1, you will create a function, like this
sub do_html
	{
	my ($html, $counter);
	return if $counter > 10;

	}

### and into it put the work that should be done for each link;
### I really did not read the whole code of yours but probably
### instead of that

### print "$full_url\n";

### you will need something like

### print "$full_url\n"; do_html($full_url);

Hope this helps;

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
   DES is dead. Let's fight RC5 now. --> http://rc5.distributed.net/


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

Date: 2 Jul 97 02:59:15 GMT
From: hribnak@nucleus.com (Jim Hribnak)
Subject: Sending email form perl via a HTML Page
Message-Id: <33b9c403.0@news.nucleus.com>


I am trying to write a perl program that our users can log into from 
outside of our Domain when they travel and still send email as if it is 
coming from us.  I have it working except when I look at all the headers 
this is what I see:

Return-Path: www
Received: (www@localhost) by nucleus.com (8.8.5/8.8.5) id UAA10475; Tue, 
1 Jul1997 20:59:43 -0600 (MDT)


I have tried other sites who have a DEMO of this sort of thing and the 
return-path shows:

Return-Path: <email address who sent it>

the 1st received line shows:

Received: from ns.gbnet.net (qmailr@ns.gbnet.net (IPaddress here)


What do I need to do in perl to set the return-path etc? or is that a 
sendmail issue?

Thanks

Jim



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

Date: Wed, 02 Jul 1997 11:08:03 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
To: TNguyen396 <tnguyen396@aol.com>
Subject: Re: Sorting Array
Message-Id: <33BA2883.1CFB@adc.metrica.co.uk>

TNguyen396 wrote:
> 
> Hi Andrew:
> 
> I get your email address from comp.lang.perl.misc and I wonder if you
> could help with my sorting problem?.  I have a text file with company
> symbol and the trading volume for that symbol (Ex:  SDS 5000
>                                           BELL 4000
>                                           MSFT 3456 etc...)
> To do the sorting, I have to split these data into two different fields:
> Company's Symbol and Trading Volume.  The problem is I only want to sort
> these data by TRADING VOLUME (but I have to make sure the Company's Symbol
> goes along with the Trading Volume),  I try many different ways, but I do
> not get the result I want.
> 
>       while ( $line = <>) {
>               ($sym,$vol) = split /\s+/,$line;
>               $listing($sym) = [$vol];
>       }
> 
>       foreach $company ( sort {_____________________} keys %listing) {
>             print "$company @{$sym{$vol}}\n";
>       }
> 
> If you think of a way to solve it, please sent me an e-mail.
> 
> Thank you very much!
> THUY

Read the FAQ at www.perl.com and search for sort after a couple of
matches you will come across:

How do I sort a hash (optionally by value instead of key)?

This will tell you all you need to know.

Simon


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

Date: Wed, 02 Jul 1997 16:16:38 +0200
From: Ernst <e.christensen@netjob.dk>
Subject: String to integer
Message-Id: <33BA62C6.283@netjob.dk>

If you have a string $a='123'
you can convert it to an integer by:

$a=$a+0;

mvh
Ernst


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

Date: Wed, 2 Jul 1997 13:39:52 GMT
From: "David W. Coppit" <dwc3q@mamba.cs.Virginia.EDU>
To: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Subroutines as arguments problem
Message-Id: <Pine.SOL.3.96.970702093727.13901B-100000@mamba.cs.Virginia.EDU>


On Wed, 2 Jul 1997, David W. Coppit wrote:

> Sorry. I'm being vague as usual. Here's a simple example:
> 
> sub retarray {
>   @a = ("c","b","a");
>   return @a;
> }
> 
> print "The output of \"sort retarray()\" is: ";
> print sort retarray();
> print "\n";
> 
> print "The output of \"sort \@temp\" is: ";
> @temp = retarray();
> print sort @temp;
> print "\n";
> 
> Running this code results in:
> 
> The output of "sort retarray()" is: 
> The output of "sort @temp" is: abc
> 
> I feel like I'm missing something very obvious here, but for the life of
> me can't figure out what it is... :-)

On further experimentation, I found that using the "&" in front of the
function call causes it to work. So now the question is, why? From what I
can tell from the camel book, "retarray()" and "&retarray()" should be
equivalent...

David

_________________________________________________________________________
David Coppit - Graduate Student        coppit@cs.virginia.edu
The University of Virginia             http://www.cs.virginia.edu/~dwc3q
"Never imagine yourself not to be otherwise than what it might appear to
others that what you were or might have been was not otherwise than what
you had been would have appeared to them to be otherwise." -Lewis Carroll



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

Date: Wed, 2 Jul 1997 13:29:40 GMT
From: "David W. Coppit" <dwc3q@mamba.cs.Virginia.EDU>
To: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Subroutines as arguments problem
Message-Id: <Pine.SOL.3.96.970702091718.13901A-100000@mamba.cs.Virginia.EDU>

> I can see no obvious reason for that to fail (although the arguments you
> give to relfield() does make me suspicious). Perhaps you can get a
> better answer if you tell us *how* it doesn't work (syntax error?
> runtime error?  unexpected results? nasal demons?)

Sorry. I'm being vague as usual. Here's a simple example:

sub retarray {
  @a = ("c","b","a");
  return @a;
}

print "The output of \"sort retarray()\" is: ";
print sort retarray();
print "\n";

print "The output of \"sort \@temp\" is: ";
@temp = retarray();
print sort @temp;
print "\n";

Running this code results in:

The output of "sort retarray()" is: 
The output of "sort @temp" is: abc

I fell like I'm missing something very obvious here, but for the life of
me can't figure out what it is... :-)

Thanks,
David

_________________________________________________________________________
David Coppit - Graduate Student        coppit@cs.virginia.edu
The University of Virginia             http://www.cs.virginia.edu/~dwc3q
"Never imagine yourself not to be otherwise than what it might appear to
others that what you were or might have been was not otherwise than what
you had been would have appeared to them to be otherwise." -Lewis Carroll



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

Date: Wed, 02 Jul 1997 13:28:59 GMT
From: Bart.Dhaenens@kahoslg.be (Bart D'haenens)
Subject: UUDECODE Mailer program in Perl 5
Message-Id: <5pdl2a$14k$1@dalet.belnet.be>

Hello,

Does anyone know if a perl script exists that is used in a .forward file on a 
user account and parses e-mail messages containing UUENCODED attachments to a 
uudecoder program and sends a reply of the message to the original sender 
containing a MIME attachment.

e.g. I receive a message containing a uuencoded document. I forward it to 
decode@my.organization and a while after I get a reply from decode containing 
the same document but as a binary MIME attachment.

Any help would greatly be appreciated and can be both posted or mailed.

Greetings,
Bart D'haenens
<bdhaenen@kahoslg.be>

KaHo Sint-Lieven
Belgium


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

Date: 2 Jul 1997 05:00:16 -0700
From: jimmy@peter.com (Jimmy Aitken)
Subject: Re: When was PERL created?
Message-Id: <5pdfsg$1fr$1@shell3.ba.best.com>

In article <867790152.23274@dejanews.com>,
 <tim@hcirisc.cs.binghamton.edu> wrote:
>Does anyone have info on when PERL was created?  Some idiot wrote a
>proposal to my company saying that PERL has no practical application
>outside of the WWW.  So I wanted to know by how much PERL pre-dates
>the web for a little extra oomph for my reply.  Thanks.

I have a message in fromt of me (hard copy) in which Larry announces
perl 2.0 beta 2 to the world.  Dated 7 May 88 08:48:56 GMT with
message ID <1978@devvax.JPL.NASA.GOV>.  In it we have such new
features as recursive subroutines now supported as well as local
variables.  How things change.

At that time you "FTP-ed files."  Now you "Surf the web."

 [ Enter Monty Python 3 Yorkshiremen sketch. ]

Jimmy
-- 
jimmy@pyramid.com [work]    For secure mail, use my PGP key available from
jimmy@peter.com   [home]    PGP servers or "finger petejim@shell3.ba.best.com" 
 __                         Key ID is: EEAB8101
 \/ http://www.peter.com
`Rrrrum Ti-Tum Ti-Tum Ti-Tum, Rrrrum Ti-Tum Ti Ta-Ta,
 Rrrrum Ti-Tum Ti-Tum Ti-Tum, Rrrrum Ti Tiddly Ta...'




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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 694
*************************************

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