[10687] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4279 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 23 13:07:20 1998

Date: Mon, 23 Nov 98 10:00:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 23 Nov 1998     Volume: 8 Number: 4279

Today's topics:
    Re: 1st Edition of Learning Perl (Xiaoyan Ma)
    Re: CGI.pm: How to translate newlines and so forth. dharrison@pinncorp.com
        Debugging joe@webolution.com
    Re: Does (.*?) do what I think it does? <jeromeo@atrieva.com>
    Re: HELP!  Newbie needs major help... <sabs45@hotmail.com>
    Re: Help: Date Validation (Clay Irving)
    Re: How do you pass parameters to Perl script from HTML dturley@pobox.com
    Re: How does one get an SSL? <garethr@cre.canon.co.uk>
    Re: How does one get an SSL? <Allan@due.net>
    Re: how to get `date` in perl for win32 (newbie) (Steve Alpert)
        How to print a simple character on the screen ? <acetone@bigfoot.com>
    Re: How to print a simple character on the screen ? minter@chop.edu
    Re: How to print a simple character on the screen ? (Andre L.)
    Re: How to tell if a file is being written to? (Clinton Pierce)
        htpasswd source code (+ crypt) <aka@takas.lt>
    Re: Mastering Regular Expressions (was Re: Recommend Pe <uri@sysarch.com>
    Re: Need equivalent to a sh's export command. <bradw@newbridge.com>
    Re: opening an already opened file (Clinton Pierce)
        parsing .htaccess from CGI script (Michael Coffman)
    Re: parsing .htaccess from CGI script <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: parsing .htaccess from CGI script (Michael Coffman)
        problem with installing LWP and related lib modules wit nguyen.van@imvi.bls.com
    Re: Sorting a flat file dturley@pobox.com
    Re: supressing output from external program in perl <r28629@email.sps.mot.com>
    Re: Trouble installing Date::Manip module (Randy Kobes)
        where are libnet and Digest::MD5 nguyen.van@imvi.bls.com
    Re: XS_unpack_charPtrPtr ?? <hongy@panther.cs.ucla.edu>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 23 Nov 1998 08:30:16 -0800
From: xma@Haas.Berkeley.EDU (Xiaoyan Ma)
Subject: Re: 1st Edition of Learning Perl
Message-Id: <3.0.32.19981123083014.00981e60@haas.berkeley.edu>

I have inherited a 1st edition of Learning Perl. Should I start with it or
it's better to spend the money for the 2nd edition?

Thanks in advance for any suggestions.

Xiaoyan





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

Date: Mon, 23 Nov 1998 17:43:56 GMT
From: dharrison@pinncorp.com
Subject: Re: CGI.pm: How to translate newlines and so forth.
Message-Id: <73c6sn$uia$1@nnrp1.dejanews.com>

In article <slrn75c61t.hp.alastair@calliope.demon.co.uk>,
  alastair@calliope.demon.co.uk wrote:
> Jarrod Stenberg <jarrod@alcmn.org> wrote:
> >
> >Then when I restore values using CGI.pm it prints it with the textarea part
> >of the form just as typed BUT I would like it to also do this when printing
> >as html.  So the obvious thing to do is: $text=param('text); $text=~ s/%0A/
> ><BR>/g; print $text; and so on but this does not work because from
> >$text=param('text) the special characters are already gone (interpreted?).
>
> Well, the regex is wrong for a start - check perlre on how to code characters
> like carriage-returns.
>
> I often circumvent this type of issue by using a <PRE></PRE> combination.
>
> HTH.
>
> --
>
> Alastair
> work  : alastair@psoft.co.uk
> home  : alastair@calliope.demon.co.uk
>

This is easily taken care of by doing the following...

$testvariable =~ s/\n/<br>/g;

That will replace all new lines with a <br>
HTMLGoD.!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 23 Nov 1998 17:08:11 GMT
From: joe@webolution.com
Subject: Debugging
Message-Id: <73c4pe$spk$1@nnrp1.dejanews.com>

I'm looking for a way to execute cgi Perl scripts and have each executed line
of code written to a text file. Any suggestions?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 23 Nov 1998 09:44:28 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: Edward Broyles <ez065718@dogbert.ucdavis.edu>
Subject: Re: Does (.*?) do what I think it does?
Message-Id: <36599EFC.FE2DC68D@atrieva.com>

Edward Broyles wrote:
> 
> Will this do what I want:
> 
> /(.*?),(.*?),(.*?)/
> 
> $abc = $1;
> $def = $2;
> $ghi = $3;

> What I want to do is read each comma delimited item into its own variable.

I might, but it will be easier if you do this.

my($abc,$def,$ghi) = split(/,/,$bigstring);


Good luck!

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: Mon, 23 Nov 1998 16:46:44 GMT
From: "J.Oliver" <sabs45@hotmail.com>
Subject: Re: HELP!  Newbie needs major help...
Message-Id: <Ujg62.1636$5n1.12871128@news.magma.ca>

OK, I'm actually far enough now that all I need is a bit of code that reads
the subject line out of a text file that contains an email and renames the
file with that subject line. And the time sent, and the sender.  So
filename=sender, subject line, time sent.

Thanks again for your help!

joliver@accelerix.com







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

Date: 23 Nov 1998 11:07:49 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Help: Date Validation
Message-Id: <73c18l$lao@panix.com>

In <36597E38.87D3C430@nortel.com> Peter J Bishop <pjb@nortel.com> writes:

>Is there a module available for validating a date? I have tried using
>Time::ParseDate which should return 0 on an invalid date but it doesn't
>seem to work.

>For example, parsedate("40/11/1998", UK) returns a seconds value
>relating to "10/12/1998".

>Failing a module, has anyone written a piece of code to perform this
>function?

The check_date subroutine in Date::Calc perhaps?

  ==================================

 `$flag = check_date($year,$mm,$dd);'

  ==================================

    This function returns a boolean value which is "true" (1) if the
    three numbers "$year", "$mm" and "$dd" represent a valid date,
    and "false" (0) otherwise.

    When determining validity, leap years are taken into account,
    i.e., the 29th of february is rejected in non-leap years.

    Year numbers must be greater than zero (negative values will be
    interpreted as large positive numbers due to their internal 2's
    complement binary representation). A year number of zero is
    invalid.

-- 
Clay Irving
clay@panix.com


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

Date: Mon, 23 Nov 1998 16:33:57 GMT
From: dturley@pobox.com
Subject: Re: How do you pass parameters to Perl script from HTML #exec statement?
Message-Id: <73c2pj$qrm$1@nnrp1.dejanews.com>

In article <tamcgee-2111981759500001@cc1017583-a.union1.nj.home.com>,
  tamcgee@home.com (Tom McGee) wrote:
> Why is this a problem?
>

Because it doesn't work is the first answer that comes to mind.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 23 Nov 1998 15:54:38 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
To: gback@teleport.com (Diane McManus)
Subject: Re: How does one get an SSL?
Message-Id: <sivhk65rr5.fsf@cre.canon.co.uk>

Diane McManus <gback@teleport.com> wrote:
> I have a credit card merchant account, but no SSL secure site to
> receive orders at.  I would like to set one up.  Could anyone give me
> assistance by telling me how to do this?

A good first start is to realise that this isn't a Perl problem, and
that you're more likely to get help on a newgroup that deals with the
subject of installing and running secure web servers.  Try whichever one
of these newsgroups seems most appropriate:

    comp.infosystems.www.servers.mac
    comp.infosystems.www.servers.misc
    comp.infosystems.www.servers.ms-windows
    comp.infosystems.www.servers.unix

Before you do that, take a look at these web pages:

    http://www.apache.org/
	Apache, an open source web server

    http://www.apache-ssl.org/
	Apache-SSL, a secure web server, based on Apache and SSLeay

    http://www.ssleay.org/
	SSLeay, a free implementation of Netscape's Secure Socket Layer

    http://www.engelschall.com/sw/mod_ssl/
	mod_ssl, an Apache interface to SSLeay

    http://raven.covalent.net/
	Raven SSL, a commercial SSL implementation for Apache

    http://www.c2.net/products/stronghold/
        Stronghold, a commercial secure web server

-- 
Gareth Rees (posted and e-mailed)


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

Date: Mon, 23 Nov 1998 11:34:00 -0500
From: "AmD" <Allan@due.net>
Subject: Re: How does one get an SSL?
Message-Id: <73c2gt$l08$1@camel21.mindspring.com>

Diane McManus wrote in message <3659798c.120011541@news.teleport.com>...
>Hi,
>From this post you can probably tell I'm a newbie here  -- along with
>the fact I don't spell that well..  :-)
>I have a credit card merchant account, but no SSL secure site to
>receive orders at.  I would like to set one up.
>Could anyone give me assistance by teelling me how to do this?  If you
>know how one would go about doing this, or can answer any of the
>questions below please reply.
>If one needs to get an SSL (for processing credit cards, etc) how do
>they get one?
>Are there any free SSL's?
>Are there places that let you use their SSL's?
>Do any of these let you use theirs for free?
>If not, what costs are involved in setting up one of these? (I ask as
>I shudder with fear it will be a fortune.)  :-)
>What would YOUrecomment?
>Thank You Very Kindly,
>-Diane


I know, since there is nothing about Perl in the question, lets use Perl to
show you one to try and find an answer.

#!/usr/local/bin/perl -w
use strict;
use LWP::Simple;
use HTML::Parse
require HTML::FormatText;
my $htmlinfo = get
("http://ink.yahoo.com/bin/query?p=SSL+free+credit+card&hc=0&hs=4");
my $info = parse_html($htmlinfo);
my $formatter = new HTML::FormatText;
print $formatter->format($info);

>PS:  I'd  "love you to death"  :-)   if when you post you could also
>cc a reply to
>Diane McManus <gback@teleport.com>


Frankly, I have a pronounced fear of death.  Thanks anyway.

AmD




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

Date: Mon, 23 Nov 1998 17:43:50 GMT
From: Steve_Alpert@idx.com.NOSPAM (Steve Alpert)
Subject: Re: how to get `date` in perl for win32 (newbie)
Message-Id: <36599eb0.2059168998@news>

j9feng@my-dejanews.com wrote:

>
>
>The following codes work fine under linux,
>
>my $date=`date`;
>
>but it will not work under win95, because the command 'date' under
>win95 will print the current date and then ask for "Enter new
>date(MM/DD/YY): " expecting you input new date or just hit ENTER.
>
>Is there a way to get the current date?
would you believe:

	perl -e "print `date /t`"

this works on NT... I think 95 might be the same.
try date /?

/steve

   NOTE: Remove junk at end of address before replying

        Steve Alpert (Steve_Alpert @ i d x . c o m)
        IDX Systems Corp.   Boston, Massachusetts



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

Date: Mon, 23 Nov 1998 12:11:16 -0500
From: Jean-Gael Gricourt <acetone@bigfoot.com>
Subject: How to print a simple character on the screen ?
Message-Id: <36599734.7D18B552@bigfoot.com>


I got a variable which contains the Ascii code of a letter for
the alphabet:  $letter=\x47;  which represents the letter 'G'

print "$letter";

doesn't print the letter actually...

Does anyone know how to do that in Perl ?
 
Thank you,

Jean


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

Date: 23 Nov 1998 17:15:07 GMT
From: minter@chop.edu
Subject: Re: How to print a simple character on the screen ?
Message-Id: <73c56r$kgp$1@netnews.upenn.edu>

Who's better than Kanyon? Jean-Gael Gricourt <acetone@bigfoot.com>!

: I got a variable which contains the Ascii code of a letter for
: the alphabet:  $letter=\x47;  which represents the letter 'G'

: print "$letter";

: doesn't print the letter actually...

Try:
	$letter="\x47";
	print $letter;
-- 
+---------------------------------------+-------------------------------+
| H. Wade Minter			| Email: minter@chop.edu	|
| Unix System Administrator		| Phone: (215) 590-1513		|
| Children's Hospital of Philadelphia	| Location: Rm. A63		|
+---------------------------------------+-------------------------------+


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

Date: Mon, 23 Nov 1998 13:37:40 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: How to print a simple character on the screen ?
Message-Id: <alecler-2311981337400001@dialup-640.hip.cam.org>

In article <36599734.7D18B552@bigfoot.com>, Jean-Gael Gricourt
<acetone@bigfoot.com> wrote:

> I got a variable which contains the Ascii code of a letter for
> the alphabet:  $letter=\x47;  which represents the letter 'G'
> 
> print "$letter";
> 
> doesn't print the letter actually...
> 
> Does anyone know how to do that in Perl ?

   $letter = "\x47";
   print $letter;

prints 'G'. What's the prob?

Andre


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

Date: Mon, 23 Nov 1998 16:29:06 GMT
From: cpierce1@mail.ford.com (Clinton Pierce)
Subject: Re: How to tell if a file is being written to?
Message-Id: <365c8b52.952435373@news.ford.com>

[Courtesy CC sent to poster in E-Mail]

On Mon, 23 Nov 1998 14:33:47 +1200, Scott Searle <scott.searle@noway.nz>
wrote:
>Gidday folks,
>
>    Just a quick question here, but how might I go about seeing if a
>process is idle, or if it is active.  I am trying to restart a database
>server, but it is critical that no records are being
>added/deleted/modified etc, while the database accessed.  My first
>attempt was to run the truss command on the pid of the database (truss
>-p pid), which worked -- it showed me that my file was not being written
>to, however there has to be a much easier way to do this.


Aiiiieee.  Glad I don't have any money wrapped up in New Zeland.

>    I will try to give a detailed description here.  A C program fires
>up and forks copies of itself to load and monitor 6 databases which are
>multiplexed (for lack of a better word) to reduce the load to one single
>database.  When the databases are larger than 80MB, they are to be
>killed, and restarted (the parent process takes care of restarting
>them).  I need to find a way that when say Database0 is larger than
>80MB, and *NOT* being written to, the perl script kills it.


I won't even ask why you're killing a database after 80MB.  I really
really don't want to know.  Please don't tell me.  

>    When the pid of Database0 is passed through truss, and isn't active,
>it shows sleeping, which I presume means it is inactive.  Therefore it
>should be ok to kill the database, and have the parent reload it.  One
>problem, truss doesn't appear to end, unless it receives a ctrl-c.  Do I
>need to fork a copy of my kill script, load truss in the child, then
>kill it after I get my reading?  Seems kind of flakey.  Can anyone offer
>any suggestions?

It sounds kind of flakey.

First of all, even though something isn't actively writing to the
database, doesn't mean it's not writing to the database.  There might be
(and probably are) open file descriptors to the databases.  Hopefully
they're catching the signal (the kill) and wrapping things up nicely.
(Don't start killing with a SIGKILL if you're fond of your data...)

Earlier you said that you were waiting till truss reports the process as
"sleeping".  Be aware that under UNIX a process may be labeled as
sleeping even though it's in the middle of flushing data out.  (Sleeping
waiting for a lock, sleeping waiting for a slow disk I/O, sleeping
waiting for a co-process to finish something.)

If you've got the source to the database, simply have it catch a
user-defined signal, process whatever is left in its transaction logs,
and queue nothing more.  When the queue is empty, exit.  

Your fork/exec(truss) strategy sounds correct, otherwise.  :-)





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

Date: Mon, 23 Nov 1998 18:12:08 +0100
From: "Andrew Chapas" <aka@takas.lt>
Subject: htpasswd source code (+ crypt)
Message-Id: <73c4pd$3pr3@Talisker.taide.net>

Hi!

Need source code for Java of Unix htpasswd utility (together with crypt.c)

Together with "crypt()" source code.

Thanks!



Andrew






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

Date: 23 Nov 1998 12:06:58 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Mastering Regular Expressions (was Re: Recommend Perl books?)
Message-Id: <x71zmu1gp9.fsf@sysarch.com>

>>>>> "IZ" == Ilya Zakharevich <ilya@math.ohio-state.edu> writes:

  IZ> [A complimentary Cc of this posting was sent to Uri Guttman 
  IZ> <uri@sysarch.com>],
  IZ> who wrote in article <x767c71494.fsf@sysarch.com>:
  IZ> You still think that the principal change to REx engine in 5.005 was
  IZ> an addition of new features.
  >> 
  >> well, what else would invalidate MRE? a speedier engine doesn't change
  >> the functionality (it shouldn't).

  IZ> The Hip Owl is about what is good, what is bad and what is ugly.  A
  IZ> speedier REx engine will change all this.  An engine without bugs will
  IZ> change this (well, I know about 3 obscure bugs with the currentn code ;-).

it is also about what regex ops mean, how to do stuff, pitfalls, and as
you say efficiency. also the comparisons to other programs' regex
engines is enlightening. the book isn't only about perl (tho' much of it is).

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 23 Nov 1998 12:26:06 -0500
From: bj <bradw@newbridge.com>
Subject: Re: Need equivalent to a sh's export command.
Message-Id: <op11zmupbgx.fsf@devnull.i-did-not-set--mail-host-address--so-shoot-me>

*ace*@programmer.net (Thomas Jordan) writes:

> On Thu, 19 Nov 1998 09:17:22 GMT, dave@mag-sol.com wrote:

> >(You can't do it in the shell either. The export command you were trying makes
> >the variable available to child processes, not the parent.)
> 
> Ok.
> I was confusing export with bash's source command.
> Given a file like .profile, you can mod it and then do:
> . ~/.profile
> and all of the export commands get reflected into the
> calling process' environment.
> 
> I'm trying to do the same thing by calling a perl script
> but source it's environmental changes into the calling process.

In the parent process, source a shell wrapper script that calls your
perl program. Have the perl program create a tmp file, with syntax
appropriate for the shell you are using, then have the wrapper script
source the tmp file. Any evironmental varaiable changes will then be
changed in the parent process, and will be inherited by any new child
processes it creates. 

bj


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

Date: Mon, 23 Nov 1998 16:29:09 GMT
From: cpierce1@mail.ford.com (Clinton Pierce)
Subject: Re: opening an already opened file
Message-Id: <365b8a0d.952110203@news.ford.com>

On 21 Nov 1998 23:25:28 GMT, gward@thrak.cnri.reston.va.us (Greg Ward)
wrote:

>On Thu, 19 Nov 1998, sara starre <nospam.perl_rocks@hotmail.com> wrote:
>>I had a file that was already opened, and I didn't realize that I hadn't
>>closed it. In a sub I opened it again. The open seemed to have no effect
>>at all - not even an error even though I was using /usr/local/bin/perl
>>-w
>>
>>Shouldn't it have either said something like (open attempted on already
>>opened file) or reset the pointer to record 1? It seemed to do nada!
>
>Under Unix (at least), it's perfectly legal to open a given file as many 
>times as you like.  (Well, at least for reading...)  Perl just inherits
>this behaviour. 

<NIT>
Just remember though, if you don't re-use the same filehandle eventually
you will run out of File Descriptors on your process.  UNIX DOES limit
you there...
</NIT>


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

Date: 23 Nov 1998 16:18:29 GMT
From: coffman@fc.hp.com (Michael Coffman)
Subject: parsing .htaccess from CGI script
Message-Id: <73c1sl$o46@fcnews.fc.hp.com>


 I have a need to use .htaccess files independant of my web server.  I
 want my CGI scripts to parse this file and determine access rights for
 the requesting machine.

 Has anyone done anything like this in perl??

 I am one step away from pulling the algorithms out of the apache src
 and trying to build from that, but I thought I would post here before
 reinventing the wheel.

 Thanks.

--
-MichaelC - coffman@fc.hp.com



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

Date: 23 Nov 1998 17:32:50 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: parsing .htaccess from CGI script
Message-Id: <83d86eid3h.fsf@vcpc.univie.ac.at>

Re: parsing .htaccess from CGI script, Michael
<coffman@fc.hp.com> said:

Michael>  I have a need to use .htaccess files independant
Michael> of my web server.  I want my CGI scripts to parse
Michael> this file and determine access rights for the
Michael> requesting machine.

    HTTPD::UserAdmin

and friends from CPAN...

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: 23 Nov 1998 17:10:59 GMT
From: coffman@fc.hp.com (Michael Coffman)
Subject: Re: parsing .htaccess from CGI script
Message-Id: <73c4v3$pne@fcnews.fc.hp.com>

Tony Curtis (Tony.Curtis+usenet@vcpc.univie.ac.at) wrote:
: Re: parsing .htaccess from CGI script, Michael
: <coffman@fc.hp.com> said:

: Michael>  I have a need to use .htaccess files independant
: Michael> of my web server.  I want my CGI scripts to parse
: Michael> this file and determine access rights for the
: Michael> requesting machine.

:     HTTPD::UserAdmin

  I had already looked at the httpd module man pages and saw nothing related
  to .htaccess, only .htpasswd.

  Is there a way to parse the .htaccess files using these modules??
  What am I missing here?

: and friends from CPAN...

: hth
: tony
: -- 
: Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
: Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
: "You see? You see? Your stupid minds!  | private email:
:     Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>

--
-MichaelC


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

Date: Mon, 23 Nov 1998 17:36:30 GMT
From: nguyen.van@imvi.bls.com
Subject: problem with installing LWP and related lib modules with LWP
Message-Id: <73c6es$u50$1@nnrp1.dejanews.com>

Hi everyone,

I got the following message when I install URI, MINE-Base64, etc.
This message popped up when I did a "make test". I kept to make
a install which I got no message back at all. Is it a problem?
Is this module going to work when I use it even though I haven't
tried it yet.
______________________________________________________________

PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
-I/opt/lib/perl5/sun4-solaris/5.00404 -I/opt/lib/perl5 -e 'use Test::Harness
qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
IO::Seekable::getpos missing at
/opt/lib/perl5/sun4-solaris/5.00404/FileHandle.pm line 59.
BEGIN failed--compilation aborted at /opt/lib/perl5/Test/Harness.pm line 7.
BEGIN failed--compilation aborted at -e line 1.
*** Error code 2
make: Fatal error: Command failed for target `test_dynamic'
_________________________________________________________________

your help is appreciated.

Thanks
Van Nguyen

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 23 Nov 1998 17:14:14 GMT
From: dturley@pobox.com
Subject: Re: Sorting a flat file
Message-Id: <73c54m$svt$1@nnrp1.dejanews.com>

In article <365868BD.73BEE0D9@roogna.eng.wayne.edu>,
  shienh gurpreet <gss2@roogna.eng.wayne.edu> wrote:
> Hello!!
> I tried looking at the perl FAQ but couldn't figure out how they were
> sorting the array with respect to any field. Here's the example database
> file I have, and I wanna sort it w.r.t. the 5th column (with %) in
> ascending order. Can someone please help as you have done before. Thank
> you.

Try looking at this tutorial:

http://www.effectiveperl.com/recipes/sorting.html

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 23 Nov 1998 09:42:10 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: Kelly Wood <kwood@music.unt.edu>
Subject: Re: supressing output from external program in perl
Message-Id: <36598252.E9B57739@email.sps.mot.com>

[posted to c.l.p.m and cotp emailed]

Kelly Wood wrote:
> 
> Hello,
> 
> I'm new to perl, so please bear with me.  I'm using perl as a front end
> to a sound synthesis
> program called csound (this is in unix by the way) by using the exec
> function:
> 
> exec("csound -d -m 0 -A devaudio -b256 -B4096 $choice.orc $choice.sco");
> 
> Perl executes csound which plays the audio, but my perl program waits
                                                                  ^^^^^ 
Are you sure, exec() waits ????

   perldoc -f exec

> until csound has finished before going on.  Is there a way to tell perl
> not to wait for csound's completion?

BTW, your post subject, though reasonable, was off-topic (you owned
topic)

-TK


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

Date: 23 Nov 1998 17:55:00 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: Trouble installing Date::Manip module
Message-Id: <slrn75j8sl.3tp.randy@theory.uwinnipeg.ca>

On Mon, 23 Nov 1998 16:18:07 +1100, 
	Grant Ozolins <grant.ozolins@anu.edu.au> wrote:
>Hi Perl People,
>
>I've been trying to install the Date::Manip module, but have had trouble
>in the make install.  
>I ran:
>Makefile.PL PREFIX=/authors/home/username/bin/perlmod 
>but when I went to make install, I got:
[snip]
>Writing
>/authors/home/username/bin/perlmod/lib/site_perl/
	sun4-solaris/auto/Date/Manip/.packlist
>/bin/sh:
>/authors/home/username/bin/perlmod/lib/sun4-solaris/5.00404/perllocal.pod:
>cannot create
>make: *** [doc_site_install] Error 1
>
>Could any kind soul suggest why this is happening?

Hi,
   It means that it couldn't create the file perllocal.pod
in the indicated directory, which probably doesn't exist. To get rid 
of the error, manually create the directory
/authors/home/username/bin/perlmod/lib/sun4-solaris/5.00404,
perhaps do a `touch perllocal.pod` in this directory, and resinstall
things. This should be a one-time problem - for future module
installations, having created this file once you shouldn't have
similar errors.

-- 
		Best regards,
		Randy Kobes

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Mon, 23 Nov 1998 17:42:34 GMT
From: nguyen.van@imvi.bls.com
Subject: where are libnet and Digest::MD5
Message-Id: <73c6q6$uhk$1@nnrp1.dejanews.com>

Hi,

I couldn't find these module. Can you guys tell me where it is?

Thanks
Van Nguyen

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sun, 22 Nov 1998 13:32:52 -0800
From: Hong Yuan <hongy@panther.cs.ucla.edu>
To: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: XS_unpack_charPtrPtr ??
Message-Id: <Pine.SOL.3.96.981122131026.1651A-100000@panther.cs.ucla.edu>


I digged out this piece of info from Advanced Perl Programming page 308:
"XS Cookbook, Dean Roehrich"

And I download "CookBookA-19960430.tar.gz" from:
http://ftp.nectec.or.th/pub/mirrors/CPAN/authors/Dean_Roehrich/

Take a look at Ex8.  It provides XS_unpack_charPtrPtr().

BTW, I tried the following in xs file:

void
foo(c)
    char *  &c

The C source:

   void foo(char **instr)
   {
      char *cptr = *instr;
      *cptr++ = 'A';  /* change the first char to 'A';
      return;
   }

In perl script:
my $c = "aBC";
foo($c);   # i'm not including the proper package name here.
print $c;  # this will print "ABC".

This seems to be working as expected.  But I don't know how to let foo()
C code to malloc memory for instr and pass it back to perl $c.


Hong.


On Sun, 22 Nov 1998, Arved Sandstrom wrote:

> You must be using less type-checking than me when you compile... :-)
>
> Seriously, I thought this was interesting and took a look, and I get
> essentially the same results. I think this is one of those cases where the
> typemap is not going to do all the work for you - if you look at it char
> ** is certainly there in TYPEMAP, featured as a T_PACKED, and in the INPUT
> and OUTPUT sections of the typemap T_PACKED is associated with
> translations of form XS_pack_* and XS_unpack_*.
>
> After doing a batch search on every file in the Perl sources, I'm
> reasonably sure that these beasts - in particular, XS_unpack_charPtrPtr -
> don't exist.
>
> Why are they there? I'd like some expert input/commentary on this myself.
> I can only guess that they're suggestions to write some of your own code
> to make an intelligent conversion of a Perl input variable to a char ** in
> an XSUB.
>
> In connection with this, you'd be calling (presumably) a Perl subroutine
> foo() as
>
> $some_int = foo($another_int, $something_that_looks_like_charPtrPtr);
>
> I've been racking my brain to figure out how you'd generate the last
> variable. A Perl scalar, let's say a string, is going to be char * in the
> XSUB. A list of strings isn't appearing as a single item anyhow. A
> reference to a scalar containing a string is showing up as an RV * inside
> the XSUB, again not as a char **.
>
> So, just as a suggestion, maybe you could post the other part - an example
> of how you would be wanting to call this sub in *Perl*. It may well be
> that you don't need char **.
>
> But for me, I'd still like to get some expert input on this whole business
> of char ** in the typemap.
>
> On 20 Nov 1998, Hong Yuan wrote:
>
> > Hi,
> >
> > I'm learning XS.  I have in xs file this:
> >
> > int
> > foo(a, b)
> >    int    a;
> >    char**  b;
> >
> > It compiled OK.  When I tried to call foo, I got:
> > Unresolved symbol: XS_unpack_charPtrPtr
> >
> > Where's XS_unpack_charPtrPtr?
>
>



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

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


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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