[17440] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4860 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 9 21:06:18 2000

Date: Thu, 9 Nov 2000 18:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <973821910-v9-i4860@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 9 Nov 2000     Volume: 9 Number: 4860

Today's topics:
        "couldn't spawn child process" error. shyam_gedela@my-deja.com
        encrypting text with a password <me@privacy.net>
    Re: encrypting text with a password (Gwyn Judd)
    Re: forking (Clay Irving)
    Re: getgrgid does not work with nis (perl 5.6.0) (Richard J. Rauenzahn)
        grep and reg exp question <vrdoljak@uclink.berkeley.edu>
    Re: grep and reg exp question (Gwyn Judd)
    Re: grep and reg exp question <joe+usenet@sunstarsys.com>
    Re: grep and reg exp question (Colin Watson)
    Re: grep and reg exp question <vrdoljak@uclink.berkeley.edu>
    Re: Handling Postcode Ranges <ianb@ot.com.au>
    Re: Handling Postcode Ranges <peter.sundstrom@eds.com>
    Re: Handling Postcode Ranges <peter.sundstrom@eds.com>
    Re: Help with if(file_exists) (Jon Ericson)
        make test (bad command or filename) <me@privacy.net>
    Re: my() changes result of function -- why? <mjcarman@home.com>
    Re: my() changes result of function -- why? <mjcarman@home.com>
    Re: Perl 5.6.0 hangs when out of bounds octal # assigne <bart.lateur@skynet.be>
        PERL under Apache nodo70@my-deja.com
    Re: PERL under Apache (Gwyn Judd)
    Re: Pushing a hash on to a stack... <bart.lateur@skynet.be>
    Re: qx(...&); hangs program <james@NOSPAM.demon.co.uk>
        returning arrays from a subroutine <taboo@comcen.com.au>
    Re: returning arrays from a subroutine <jeff@vpservices.com>
    Re: returning arrays from a subroutine <taboo@comcen.com.au>
        Secured http ( https) <carlywu@yahoo.com>
    Re: That IxHash ordered Data::Dump again ... <jeff@vpservices.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 10 Nov 2000 01:36:23 GMT
From: shyam_gedela@my-deja.com
Subject: "couldn't spawn child process" error.
Message-Id: <8ufjen$tgv$1@nnrp1.deja.com>

Hi all,
i have installed apache_1.3.14 on my NT box. In the httpd.conf file i
scriptaliased my cgi-bin directory. However when i try to run a cgi
script in this directory i get a
"The server encountered an internal error or misconfiguration and was
unable to complete your request." error.

In my error logs the message is

[Thu Nov 09 19:42:06 2000] [error] [client 127.0.0.1] couldn't spawn
child process: c:/program files/apache group/apache/cgi-bin/database.cgi

I have also left the MaxRequestPerChild at the default value of zero.

Any ideas as to what may be going on ?

Thanks in anticipation
Shyam


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 10 Nov 2000 00:00:01 GMT
From: "EM" <me@privacy.net>
Subject: encrypting text with a password
Message-Id: <5UGO5.2697$Nw6.8145@news.iol.ie>

could someone please give me a code to encrypt and decrypt a text with a
password
the encryption must be kind of strong

thanks in advance




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

Date: Fri, 10 Nov 2000 00:44:41 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: encrypting text with a password
Message-Id: <slrn90mh7j.6ca.tjla@thislove.dyndns.org>

I was shocked! How could EM <me@privacy.net>
say such a terrible thing:
>could someone please give me a code to encrypt and decrypt a text with a
>password
>the encryption must be kind of strong

What does 'kind of' mean in relation to strong? Never mind, I think I
know what you mean. The UNIX crypt() function is not really applicable
here because there is no known decryption function. Go to CPAN and do a
search for 'Crypt'.

http://search.cpan.org

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
lawsuit, n.:
	A machine which you go into as a pig and come out as a sausage.
		-- Ambrose Bierce


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

Date: 10 Nov 2000 01:04:07 GMT
From: clay@panix.com (Clay Irving)
Subject: Re: forking
Message-Id: <slrn90mic7.8hj.clay@panix2.panix.com>

On Thu, 9 Nov 2000 17:36:22 +0100, ghwen <ghwen@infonie.fr> wrote:

>Is there a way to launch a kid who is killed if the father is killed ?

Use a catapult.

Can you be a bit more specific?

-- 
Clay Irving <clay@panix.com>
RECOLLECT, v. To recall with additions something not previously known. 
- Ambrose Bierce 


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

Date: 9 Nov 2000 23:23:17 GMT
From: nospam@hairball.cup.hp.com (Richard J. Rauenzahn)
Subject: Re: getgrgid does not work with nis (perl 5.6.0)
Message-Id: <973812197.182333@hpvablab.cup.hp.com>

"Elaine Ashton" <elaine@chaos.wustl.edu> writes:
>"Olivier LACROIX" <Olivier.Lacroix@ciril.fr> wrote in message
>news:3A0A8746.A15AE441@ciril.fr...
>>
>> I have rebuilt perl with gcc instead of HPUX cc and getgr* work fine
>now.
>> But I don't understand why.
>
>The cc on HP-UX 10.20 is K&R, not ANSI. I believe the Readme for HPUX
>explains this in some detail.

minor nit:

The cc that ships by default on HP-UX 10.20 is K&R and is only there to
build the kernel.  The HP-UX ANSI C compiler is (obviously enough) ANSI
compliant.

On 10.x you have to specify -Aa to get it into ANSI mode.  Starting with
11.00, it defaults to ANSI mode.

I'd test Olivier's problem above, except that I'm not in an NIS
environment.

Rich
-- 
Rich Rauenzahn ----------+xrrauenza@cup.hp.comx+ Hewlett-Packard Company
Technical Consultant     | I speak for me,     |   19055 Pruneridge Ave. 
Development Alliances Lab|            *not* HP |                MS 46TU2
ESPD / E-Serv. Partner Division +--------------+---- Cupertino, CA 95014


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

Date: Thu, 09 Nov 2000 16:21:39 -0800
From: Gordon Vrdoljak <vrdoljak@uclink.berkeley.edu>
Subject: grep and reg exp question
Message-Id: <3A0B3F93.F6944E10@uclink.berkeley.edu>

Hello,
I have a user form which people fill out on the web.  It searches for their last
name from seperate text file which includes last name, first name, email, etc. 
If the search fails it gives them an error that they were not in our database.

The code for checking looks like this:

open (GREP, "grep -i '$lastname' format.txt|");
@search_result = <GREP>;
close (GREP);
$search_result=@search_result;
if ($search_result < 1)
        {
        $url = "http://localhost/error-notuser.html";
        print "Location: $url\n\n";
        exit;
        }         

My problem is that if the person puts in nothing for their lastname, or if they
put in a single letter, it gives a positive result for the search result.
Is there a way of making it strictly find a last name in the text file, or just
redirect if the $lastname variable they input is empty, or a single character?
Thanks for any advice, I appreciate it.
Gordon.


-- 
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Gordon Ante Vrdoljak                                  Electron Microscope Lab
ICQ 23243541   http://nature.berkeley.edu/~gvrdolja   26 Giannini Hall
vrdoljak@uclink.berkeley.edu                          UC Berkeley
phone (510) 642-2085                                  Berkeley CA 94720-3330
fax   (510) 643-6207 cell (510) 290-6793


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

Date: Fri, 10 Nov 2000 00:49:48 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: grep and reg exp question
Message-Id: <slrn90mhh6.6ca.tjla@thislove.dyndns.org>

I was shocked! How could Gordon Vrdoljak <vrdoljak@uclink.berkeley.edu>
say such a terrible thing:
>I have a user form which people fill out on the web.  It searches for their last
>name from seperate text file which includes last name, first name, email, etc. 
>If the search fails it gives them an error that they were not in our database.
>
>open (GREP, "grep -i '$lastname' format.txt|");

>Is there a way of making it strictly find a last name in the text file, or just

Note that the code you are using doesn't use Perl to search the file. I
think we need to know a little more about the format of the text file
before anyone will be able to really help you.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Home is the place where, when you have to go there, they have to take you in.
		-- Robert Frost, "The Death of the Hired Man"


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

Date: 09 Nov 2000 19:53:21 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: grep and reg exp question
Message-Id: <m37l6cabr2.fsf@mumonkan.sunstarsys.com>

Gordon Vrdoljak <vrdoljak@uclink.berkeley.edu> writes:

> The code for checking looks like this:
> 
> open (GREP, "grep -i '$lastname' format.txt|");

Did you develop your code with taint checks (-T flag)? 
What regexp did you use to untaint $lastname earlier
in your code?

--
Joe Schaefer


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

Date: 10 Nov 2000 01:03:13 GMT
From: cjw44@flatline.org.uk (Colin Watson)
Subject: Re: grep and reg exp question
Message-Id: <8ufhgh$6bj$1@riva.ucam.org>

Gordon Vrdoljak <vrdoljak@uclink.berkeley.edu> wrote:
>I have a user form which people fill out on the web.  It searches for
>their last name from seperate text file which includes last name, first
>name, email, etc. If the search fails it gives them an error that they
>were not in our database.
>
>The code for checking looks like this:
>
>open (GREP, "grep -i '$lastname' format.txt|");
>@search_result = <GREP>;
>close (GREP);
>$search_result=@search_result;
>if ($search_result < 1)

As a side note, '$search_result=@search_result' could end up being
rather confusing. You might as well just compare the length of the array
directly without having the assignment there, and 'unless
(@search_result)' might be slightly better style.

>My problem is that if the person puts in nothing for their lastname, or
>if they put in a single letter, it gives a positive result for the
>search result. Is there a way of making it strictly find a last name in
>the text file, or just redirect if the $lastname variable they input is
>empty, or a single character?

The way you've implemented it this is really a grep problem rather than
a Perl problem. Depending on the exact format of the file - I'll assume
that a last name comes at the start of each line and is immediately
followed by a space - "grep -i '^$lastname ' format.txt|" would do the
job.

Note that your script has other problems, though. If you aren't using
taint mode (why not?) then that pipe open is dangerous; what happens if
somebody searches for a last name like "' /dev/null; rm -rf ~; grep '"?
You could launder the field first, but there's really no need to bother,
since you can do the same thing in pure Perl without having to invoke an
external process (and gain portability to non-Unix systems as a bonus):

  open FORMAT, 'format.txt';
  my @search_result = grep /^$lastname /, <FORMAT>;
  close FORMAT;

-- 
Colin Watson                                     [cjw44@flatline.org.uk]
"On Usenet, pedantry is not in the service of beauty. It's not even
 in the service of truth. It's in the service of EVEN MORE PEDANTRY."


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

Date: Thu, 09 Nov 2000 17:29:55 -0800
From: Gordon Vrdoljak <vrdoljak@uclink.berkeley.edu>
Subject: Re: grep and reg exp question
Message-Id: <3A0B4F93.7630D23@uclink.berkeley.edu>

Hello,
thanks for your replies...
No, I didn't use taint checks.

The format of the text file I am pulling in is:
"Elizabeth","Bergen","23763","","201 Wellman","","Resh"
"Virginetta","Cannon","36230","","311 LSA","4860788","Keller"
"Mark","Carrier","27742","","311A Koshland Hall","8499221","Sussex"
etc...

It is a comma seperated output of our filemaker database of users with first,
lastname, phone, email, address, Lab phone, and supervisor.

If there is another method for checking for a user's last name (inputed by a
form) in our text file database and then doing a redirect if there is not a
match to the database, I'll try it happily.  My concern is that if someone
leaves their lastname blank, or put in a single letter of anyone's last name -
my script just accepts this instead of redirecting.
gordon.

Joe Schaefer wrote:
> 
> Gordon Vrdoljak <vrdoljak@uclink.berkeley.edu> writes:
> 
> > The code for checking looks like this:
> >
> > open (GREP, "grep -i '$lastname' format.txt|");
> 
> Did you develop your code with taint checks (-T flag)?
> What regexp did you use to untaint $lastname earlier
> in your code?
> 
> --
> Joe Schaefer

-- 
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Gordon Ante Vrdoljak                                  Electron Microscope Lab
ICQ 23243541   http://nature.berkeley.edu/~gvrdolja   26 Giannini Hall
vrdoljak@uclink.berkeley.edu                          UC Berkeley
phone (510) 642-2085                                  Berkeley CA 94720-3330
fax   (510) 643-6207 cell (510) 290-6793


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

Date: Fri, 10 Nov 2000 09:24:35 +1100
From: Ian Boreham <ianb@ot.com.au>
Subject: Re: Handling Postcode Ranges
Message-Id: <3A0B2423.869B85AD@ot.com.au>

Peter Sundstrom wrote:

> The postcodes will range from 0 to 9999.  I was thinking about initialising
> a hash for the entire range, but it seems overkill to initialise 10,000
> values.

Why a hash an not just a good old-fashioned array? Lookup should be faster and
it should be more space-efficient, if you are populating the entire range.

Regards,


Ian




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

Date: Fri, 10 Nov 2000 12:33:59 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Handling Postcode Ranges
Message-Id: <8ufcf1$d61$1@hermes.nz.eds.com>


Wolfgang Hielscher <W.Hielscher@mssys.com> wrote in message
news:3A0B21D0.156CA15B@mssys.com...
> Peter Sundstrom wrote:
> > I'm looking for an efficient way of handling postcode ranges in
reasonably
> > large files (20Mb).  I need to return a number of the postcode range
> > sequence.  For example:
> >
> > 0000-1000    return 1
> > 1001-2000    return 2
> > 2001-2500    return 3
> > ...
> >
> > The postcode ranges will vary depending on the file being processed, so
I
> > need to initialise the postcode ranges from a configuration file.
>
> (I don't see the relevance of the 20Mb-File, so I hope I didn't miss the
> point of your problem.)

Only that I have to process each line in the file, so I need something that
will work efficiently.

> Assumtions:
> - no two ranges have any element in common
> - all postcodes are elements of a range
> - the ranges are in an "ascending order"

Correct assumptions in my case.

>
> Then one way to do it is to save the upper bounds of each range in an
> array at the index representing the range-id. Something like:
>
> use strict;
>
> open FH, "p_ranges.txt"  or  die "Sorry: $!";
> my @upper_bound;
> while ( <FH> ) {
>    /(\d{4})-(\d{4})\s*return\s*(\d+)/  or next;
>
>    $upper_bound[$3] = $2;
> }
>
> All what's left to do is to bsearch (or linear search ?!) the array
> @upper_bound for the least array-index whose element is greater than
> your actual postcode.
>
> > The postcodes will range from 0 to 9999.  I was thinking about
initialising
> > a hash for the entire range, but it seems overkill to initialise 10,000
> > values.
> But my solution seems to be even a bigger overkill. The code presented
> above yields an advantage of about 3 MBytes compared to populating a
> hash with 10000 numbers.
> So why wasting additional memory and time for writing (or "use"ing) a
> search function while not profiting form an "efficent", free hash
> lookup?!
>
> > Suggestions on how to handle it will be greatfully accepted.
> My suggestion: Use a hash.

So are you are saying that the cost of setting up a hash would be fairly
minimal compared to any other method?





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

Date: Fri, 10 Nov 2000 14:04:11 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Handling Postcode Ranges
Message-Id: <8ufho5$ke7$1@hermes.nz.eds.com>


Ian Boreham <ianb@ot.com.au> wrote in message
news:3A0B2423.869B85AD@ot.com.au...
> Peter Sundstrom wrote:
>
> > The postcodes will range from 0 to 9999.  I was thinking about
initialising
> > a hash for the entire range, but it seems overkill to initialise 10,000
> > values.
>
> Why a hash an not just a good old-fashioned array? Lookup should be faster
and
> it should be more space-efficient, if you are populating the entire range.

I'm unsure how you would implement it as an array lookup.




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

Date: 9 Nov 2000 23:10:15 GMT
From: Jonathan.L.Ericson@jpl.nasa.gov (Jon Ericson)
Subject: Re: Help with if(file_exists)
Message-Id: <8FE7925CDJonathanLEricsonjpln@137.78.50.25>

On 09 Nov 2000, phallicity_2000@yahoo.com (Phallicity) wrote:

>I am trying to check the existance of a file.  The cgi script is being
>run from www.somepage.com/cgi-bin/test/prog.cgi.  I want prog.cgi to
>test for the existance of file www.somepage.com/junk/more/me.gif.  

'perldoc -f -X'

>Can
>someone tell me how to write the if statement?  I have tried: if
>(/junk/more/me.gif) {...}  but I get an error from the server when I
>try to run this.

1) You can't just make stuff up and hope that it will work.
2) Learn Perl (the general programming language) before jumping into CGI.
3) Read the documentation before asking everyone on comp.lang.perl.misc to 
correct your syntax.

Jon


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

Date: Fri, 10 Nov 2000 00:55:38 GMT
From: "EM" <me@privacy.net>
Subject: make test (bad command or filename)
Message-Id: <eIHO5.2706$Nw6.8225@news.iol.ie>

in every module i download it says i need to do this

 1. perl Makefile.PL
 2. make
 3. make test
 4. make install

step 1 works all others fail with error "bad command or filename"
i know it means the file doesnt exist but where can i get it?
i am using activeperl on windows me

thanks




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

Date: Thu, 09 Nov 2000 16:20:33 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: my() changes result of function -- why?
Message-Id: <3A0B2331.35FE6DF6@home.com>

Neil Montgomery wrote:
> 
> I wrote a program that needed to do various things with matrices of
> numbers, including writing these matrices to files. Some code follows
> below, stripped down to the bare essentials of the problem, so I
> realize that my code does not follow best practices.

Yes, like using -w (which would have helped you here) and 'use strict'
These are invaluble debugging aids, and you should always use them.
(Especially before posting here, or some of the natives will get testy.
:)

> wmatrix1 works, but wmatrix2 does not (it prints a single \n to the
> file "f2".
>
> I would be interested in learning why this happens, when the two
> functions look rather similar, except that I used my() in the first
> one.
[snip code]

It isn't the my, it's the binding. The '@' dereference in the foreach
loop binds more tightly than the array subscript. So when you say this:

@$_[1]

it's equivilant to

{@$_}[1]

instead of

@{$_[1]}

which is what you really want, and what you effectively end up with when
you make a local copy. Binding and precedence problems can be a bugger,
which is why I tend to (over)use brackets and parantheses to force
everything to act the way I want it to. When in doubt, force it, or at
least test it to be sure.

If you had enabled warnings, perl would have told you that you used an
uninitialized variable on that line. Well, it would have told you that
for your example; in your larger program $_ may well have had a value,
in which case -w would have told you that $_ did not contain an array
reference instead.

-mjc


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

Date: Thu, 09 Nov 2000 16:25:29 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: my() changes result of function -- why?
Message-Id: <3A0B2459.7AB4DECA@home.com>

Michael Carman wrote erroneously:
> 
> @$_[1]
> 
> it's equivilant to
> 
> {@$_}[1]

Oops, fingers outran the brain there. This should read "@{$_}[1]"

Can't subscript a block... :)

> instead of
> 
> @{$_[1]}
> 

-mjc


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

Date: Thu, 09 Nov 2000 23:13:42 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Perl 5.6.0 hangs when out of bounds octal # assigned
Message-Id: <cqbm0ts51uvqar2vhgod3pf7c5ltll8mnm@4ax.com>

eggrock@my-deja.com wrote:

>Hasty, ill-thought out code parses a string and pulls a date in YYMMDD
>format, then assigns to $year, $month, $mday with YY, MM and DD,
>respectively.
>
>If any of the three contain zero as the first digit the number is
>treated as octal. On the occurrence of "08" or "09", the script just
>hangs, no errors, no warnings (-w switch is used).

I don't think so.

	$_ = '08';
	$_ += 1;
	print;
-->
	9

Only bare numbers in source code starting with 0 are treated as octal.
Strings converted to a number, are treated as decimal by default.

-- 
	Bart.


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

Date: Fri, 10 Nov 2000 00:19:15 GMT
From: nodo70@my-deja.com
Subject: PERL under Apache
Message-Id: <8ufett$psp$1@nnrp1.deja.com>

Anyone know why my perl script work if using IE but not Netscape?  I
have "print $foo-header" in my script and still don't know why?  The
error message said URL (which located my script.pl file) not found.

Thanks,
Nodo


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 10 Nov 2000 00:46:48 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: PERL under Apache
Message-Id: <slrn90mhbj.6ca.tjla@thislove.dyndns.org>

I was shocked! How could nodo70@my-deja.com <nodo70@my-deja.com>
say such a terrible thing:
>Anyone know why my perl script work if using IE but not Netscape?  I
>have "print $foo-header" in my script and still don't know why?  The
>error message said URL (which located my script.pl file) not found.

Well if it works in one but not the other, then it's probably not a Perl
(not PERL) problem. I suggest you ask this question again in a more
appropriate group such as comp.infosystems.www.authoring.cgi.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
One man's folly is another man's wife.
		-- Helen Rowland


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

Date: Thu, 09 Nov 2000 23:10:50 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Pushing a hash on to a stack...
Message-Id: <djbm0tsentft92vrv571gd9cidj71hcph3@4ax.com>

Christopher Burke wrote:

>Basically I want to be able to do this sort of thing...
>
>$hash{X} = 4;
>$hash{Y} = 5;
># push %hash onto stack .....
>$hash{X} = 4;
>$hash{Y} = 5;
># push %hash onto stack .....
>.
>.
>.
>print $fulldata[0]{X}."\n";
>print $fulldata[0]{Y}."\n";
>print $fulldata[1]{X}."\n";
>print $fulldata[1]{Y}."\n";
>
>And no - I don't want to use references.

But you ARE using references! If $fulldata[0]{X} is to be valid, then
$fulldata[0] must be a hash reference.

BUt I assume you don't want to push \%hash, for example because you
reuse the same %hash, and modifying %hash would also modify what is on
the stack. So push { %hash } (a rerence to a copy of the hash) instead.

	push @fulldata, { %hash };

-- 
	Bart.


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

Date: Fri, 10 Nov 2000 00:43:52 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: qx(...&); hangs program
Message-Id: <ant100052d07fNdQ@oakseed.demon.co.uk>

In article <3A0AF058.F801831B@home.com>, Michael Carman
<URL:mailto:mjcarman@home.com> wrote:
>
> exec() never returns

Unless it fails to run the given program.

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: 10 Nov 2000 11:51:43 +1100
From: "Kiel Stirling" <taboo@comcen.com.au>
Subject: returning arrays from a subroutine
Message-Id: <3a0b469f$1@nexus.comcen.com.au>


Hi all, I want to return two array's from a subroutine. Can u do this??
maybe something like,

#/usr/bin/perl -w
#################################################################
use strict;

my (@array1,@array2);
(@array1,@array2) = returnsub();

print foreach @array1;
print foreach @array2;
################################################################
sub returnsub {
        my (@buffer1,@buffer2);
        $buffer1[0] = "blar";
        $buffer2[0] = "blar";
        return ($buffer1,$buffer2);
}
#################################################################


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

Date: Thu, 09 Nov 2000 17:02:15 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: returning arrays from a subroutine
Message-Id: <3A0B4917.82E7F9BB@vpservices.com>

Kiel Stirling wrote:
> 
> Hi all, I want to return two array's from a subroutine. Can u do this??

What is this, a homework assignment?  The exact same question was posted
and answered here two days ago.  See the thread  "How to return @Array1
and @Array2?".

-- 
Jeff


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

Date: 10 Nov 2000 11:59:50 +1100
From: "Kiel Stirling" <taboo@comcen.com.au>
Subject: Re: returning arrays from a subroutine
Message-Id: <3a0b4886$1@nexus.comcen.com.au>


I see the prob, sorry !

return ($buffer1,$buffer2);

should be 

return (@buffer1,@buffer2);


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

Date: Fri, 10 Nov 2000 10:19:59 +1100
From: "Carl Wu" <carlywu@yahoo.com>
Subject: Secured http ( https)
Message-Id: <3a0b3071$0$19412$7f31c96c@news01.syd.optusnet.com.au>

I wonder is it possible to user perl to automate the https transaction.
Consider the following we normally do using a web browser:
  A broker's web page requires username and password, after you login you
can download some stock data. The CGI scripts use https protocol.

My question is: Can this process be automated using Perl (on Linux) ?

Any help greatly appreciated!

Carl Wu





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

Date: Thu, 09 Nov 2000 16:58:56 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: That IxHash ordered Data::Dump again ...
Message-Id: <3A0B4850.998C8AE0@vpservices.com>

Andrew Cragg wrote:
> 
> Anyone tried to Data::Dump a Tie::IxHash'ed hash reference?
> ...
> And this is wot I got in a_file.txt :
> 
> $A_HashRef = {
>                'Rock' => 'Rock',
>                'Cary' => 'Cary',
>                'Howard' => \$A_HashRef->{'Rock'},
>                'Clint' => \$A_HashRef->{'Cary'},
>                'Fred' => \$A_HashRef->{'Rock'},
>                'Ginger' => \$A_HashRef->{'Cary'}
>              };
> 

Hmm this is what mine looks like with same script cut and pasted (except
using the installed version of Tie::IxHash rather than the lib):

$A_HashRef = {
               'Rock' => 'Rock',
               'Cary' => 'Cary',
               'Howard' => 'Howard',
               'Clint' => 'Clint',
               'Fred' => 'Fred',
               'Ginger' => 'Ginger'
             };

That's with Tie::IxHash 1.21, Data::Dumper 2.01, perl 5.6 (ActiveState
build 618), on win98.

-- 
Jeff


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

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

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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

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

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 4860
**************************************


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