[16799] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4211 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 2 21:06:38 2000

Date: Sat, 2 Sep 2000 18:05:20 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <967943119-v9-i4211@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 2 Sep 2000     Volume: 9 Number: 4211

Today's topics:
    Re: Blat guru please !?! (Maggert)
        DBD::ODBC and date/time fields (David Wall)
    Re: Debugging tools <mjcarman@home.com>
    Re: E-Commerce----application---needed (Maggert)
        exec, Apache, win32 <chs@netlink.com.au>
    Re: Help! my comma's are comma%27s <flavell@mail.cern.ch>
        How do you setup a loop to run until some presses a key <garyb1@home.com>
    Re: How do you setup a loop to run until some presses a <dietmar.staab@t-online.de>
        How to truncate file after nth occurrence of string <gustfrnt@globalvision.net>
    Re: How to truncate file after nth occurrence of string <godzilla@stomp.stomp.tokyo>
    Re: learning perl <anmcguire@ce.mediaone.net>
        More JAPH (Was: Re: coderef to object method?) (Jakob Schmidt)
    Re: More JAPH (Was: Re: coderef to object method?) (Randal L. Schwartz)
    Re: More JAPH (Was: Re: coderef to object method?) (Jakob Schmidt)
    Re: More JAPH (Was: Re: coderef to object method?) (Abigail)
    Re: More JAPH (Was: Re: coderef to object method?) (Jakob Schmidt)
    Re: More JAPH (Kevin Reid)
    Re: open web file (Kevin Reid)
        Perl 5.7.0 (Jarkko Hietaniemi)
        perl regex to strip out anything other than a letter or <sungfung@yahoo.com>
    Re: perl regex to strip out anything other than a lette <simonis@myself.com>
    Re: perlcc - Compiler errors <leebas@worldnet.att.net>
    Re: Q?: alphabetical search <dietmar.staab@t-online.de>
        Question Perl Cookbook 17.6 tlynch001@my-deja.com
        Return-value of open of nonexisting pipe <Martin.H.Ludwig@ing-buero-ludwig.de>
    Re: Return-value of open of nonexisting pipe (Abigail)
    Re: script problems (Heikki Simperi)
    Re: Setup Factory for Linux? <bbollenbach@home.com>
    Re: Setup Factory for Linux? <japh@flashmail.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sat, 02 Sep 2000 19:57:32 GMT
From: mag@ionet.net (Maggert)
Subject: Re: Blat guru please !?!
Message-Id: <39b15b5b.676460849@news.ionet.net>

On Fri, 1 Sep 2000 23:16:35 +1000, "James R"
<reevehotNOSPAM@hotmail.com> wrote:

	I sometimes emit this sound when I have to do the number2. I
guess this makes me a guru.
	use Net::SMTP;


MP


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

Date: 2 Sep 2000 15:27:20 -0400
From: darkon@one.net (David Wall)
Subject: DBD::ODBC and date/time fields
Message-Id: <8FA399CC4darkononenet@206.112.192.118>


[My original post is gone from my news server, so I can't reply to it.]

OK, now I feel silly, because the way to handle date fields with ODBC was 
right there in my copy of "Programming the Perl DBI" on page 293.  The 
following code works as expected.


#!/usr/bin/perl -w
use strict;
use DBI qw(:sql_types);
 
my $statement = qq|select OPEN_DATE from combined 
    where (OPEN_DATE between ? and ?) 
    ORDER BY OPEN_DATE|;
   
my @query_parms=( "{d '2000-07-03'}", "{d '2000-07-10'}" );
 
my $dbh = DBI->connect('DBI:ODBC:HHElocal', '', '', 
    {RaiseError=>1, LongReadLen=>1000} );
my $sth = $dbh->prepare( $statement )
    or die "Can't prepare SQL statement: ", $dbh->errstr(), "\n"; 
 
for (my $i=0; $i < @query_parms; $i++) {
    $sth->bind_param($i+1, $query_parms[$i], SQL_DATE) or die $!;         
}

my $rv = $sth->execute() 
    or die "Cannot execute SQL: ", $dbh->errstr(), "\n"; 



-- 
David Wall
darkon@one.net


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

Date: Mon, 28 Aug 2000 10:15:38 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Debugging tools
Message-Id: <39AA821A.3CD2DA37@home.com>

Are Bjoerby wrote:
> 
> I am developing scripts for a server without any debugging modules
> installed. Is there any tool available that will compile a script
> and check for syntax errors?

Just use the -c flag. (Syntax check only, don't execute.)

perl -cw <myfile>

-mjc


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

Date: Sat, 02 Sep 2000 20:02:49 GMT
From: mag@ionet.net (Maggert)
Subject: Re: E-Commerce----application---needed
Message-Id: <39b15c08.676633607@news.ionet.net>

On Fri, 01 Sep 2000 04:36:39 GMT, "Irene Facchin"
<xtremex@telusplanet.net> wrote:

>I am looking for a perl application for E-Commerce,

	Minivend ring a bell?


MP


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

Date: Sun, 3 Sep 2000 09:58:06 +1000
From: "Chris Seeling" <chs@netlink.com.au>
Subject: exec, Apache, win32
Message-Id: <8os4m8$bgf$1@news.netlink.com.au>

This question is probaly more of an Apache question but here it goes:

I would like to start a Window app. (such as Excel.exe) on the server
using say
    my_server/cgi-bin/test01.pl
on the browser
where test01.pl contains:
        ...
        exec("excel.exe");

Excel should macro away and the job is done. Unfortunately this simplistic
approach does not appear to work (the excel gui never appears). Is it a
question of permissions on the cgi directory?

(ps. I am a novice on Apache and Perl. So it's more than possible that I am
missing the bleeding obvious).




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

Date: Sat, 2 Sep 2000 19:49:54 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Help! my comma's are comma%27s
Message-Id: <Pine.GHP.4.21.0009021948570.1247-100000@hpplus03.cern.ch>

On 2 Sep 2000, Tina Mueller wrote:

> > Writing your own Brenner style read and parse will
> > resolve this problem
> 
> which problem? and what's a Brenner style read?

Please do not feed the troll.



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

Date: Sat, 02 Sep 2000 22:12:04 GMT
From: "Gary Brown" <garyb1@home.com>
Subject: How do you setup a loop to run until some presses a key?
Message-Id: <UWes5.37022$i5.1642175@news1.rdc2.on.home.com>

I am tyring to setup a test condition which will keep running until someone
presses a particular key.  The script is actual logging system processes and
I want it to run as soon as the script is started and end by pressing a
specific key (like press "s" for stop).

This will run on a Winnt machine using active perl.

Any ideas?  This does not sound difficult, but I cannot find a solution
anywhere in my perl book collection.

Thanks,
Gary





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

Date: Sun, 03 Sep 2000 02:38:46 +0100
From: "Dietmar Staab" <dietmar.staab@t-online.de>
Subject: Re: How do you setup a loop to run until some presses a key?
Message-Id: <8os6n5$nk0$16$1@news.t-online.com>

In article <UWes5.37022$i5.1642175@news1.rdc2.on.home.com>, "Gary Brown"
<garyb1@home.com> wrote:
 
> Any ideas?  This does not sound difficult, but I cannot find a solution
> anywhere in my perl book collection.

Term::ReadKey to perform a non-blocked read?

D.




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

Date: Sat, 2 Sep 2000 16:40:24 -0400
From: "Bryan McAvoy" <gustfrnt@globalvision.net>
Subject: How to truncate file after nth occurrence of string
Message-Id: <sr2pgil6c5d107@corp.supernews.com>

Hi all,

I want to truncate a log file. Basically this file consists of hundreds of
similar products all separated by a "$$" string. I only want the last 5
products. Thus, I want to truncate the log file after the 5th occurrence of
the "$$" string and write that to a new file. I cannot figure out how
truncate this file based on the nth occurrence of a string. Can anyone help?

bpm




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

Date: Sat, 02 Sep 2000 14:53:25 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: How to truncate file after nth occurrence of string
Message-Id: <39B176D5.1ACA09D9@stomp.stomp.tokyo>

Bryan McAvoy wrote:

> I want to truncate a log file. Basically this file consists of hundreds of
> similar products all separated by a "$$" string. I only want the last 5
> products. Thus, I want to truncate the log file after the 5th occurrence of
> the "$$" string and write that to a new file. I cannot figure out how
> truncate this file based on the nth occurrence of a string. Can anyone help?


You need to state your parameters clearly and concisely.
These parameters you state are self-contradictory. You
have not indicated if this is a single line flat file,
a multi-line flat file, a two, three... four dimensional
file or something else.

"...truncate the log file after the 5th occurrence 
    of the "$$" string...."

This would pick off all entries after the fourth data
set, if your database is single line flat file using
a common format. You indicate you want the last five 
products yet exemplify a case of grabbing all but the 
first four products. You are contradicting yourself 
pertaining to your parameters.If your format is different
than a single line flat file, there is no way of knowing 
what you are asking. Could be any format, nothing but 
a guessing game.

Use of a meta-character for a delimiter is most illogical.

If you are truly interested in receiving help from people
here, post your parameters clearly and concisely along
with a snippet of your current code and a snippet of
of your data structure so people can make sense of
what you are asking. As is, this is truly nonsense.

Provide something sensible and you will receive some
sensible answers, such as a simple counter, rindex and
substring to grab the last five products. Shouldn't 
take more than ten minutes to write a ten line script
to do this, without having to play a guessing game.

No tickie, no washie.


Godzilla!
-- 
@© = (a .. z); @® = qw (7 15 4 26 9 12 12 1 18 15 3 11 19);
srand(time() ^ ($$ + ($$ << 15))); for ($§ = $®[$®[0]]; $§ < $®[0]; $§++)
{ sub G { rand(1000) < 500 ? "\u$1" : "\l$1" ; } foreach $¿ (@®) 
{ $¢ = $©[$¿-1]; $¢ =~ s¡([a-z])¡G($1)¡gie; $Ø = "$Ø$¢"; }
$Ø ="$Ø! "; $ø = substr ($Ø, $®[12] - $®[11], 0, " ");
$Ø =~ s¯(a)(r)¯$1 $2¯i; print "$Ø\n"; } exit;


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

Date: Sat, 2 Sep 2000 13:29:12 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: learning perl
Message-Id: <Pine.LNX.4.21.0009021324010.31781-100000@hawk.ce.mediaone.net>

On Fri, 1 Sep 2000, Russ Jones quoth:

~~ Date: Fri, 01 Sep 2000 09:45:15 -0500
~~ From: Russ Jones <russ_jones@rac.ray.com>
~~ Newsgroups: comp.lang.perl.misc
~~ Subject: Re: learning perl
~~ 
~~ W Kemp wrote:
~~ > 
~~ > Simon Voorwinde wrote in message <39af9495@news1.idx.com.au>...
~~ > >Where's is the best place to learn perl ?
~~ > >
~~ > 
~~ > I started learning perl when I was in the south of France.  Lovely
~~ > mountains, with a clear river cascading down into a lovely valley full of
~~ > vinyards.  Where better?
~~ 
~~ I learned it during frequent trips to the crapper.

Same here! I also learned alot in a Chinese restaurant eating 
chicken fried rice.  Chicken fried rice is my programming food
(don't ask, because I don't know why).  I write better code running
on a tummy full of chicken fried rice.

anm
-- 
Andrew N. McGuire
anmcguire@ce.mediaone.net
perl -le'print map?"(.*)"?&&($_=$1)&&s](\w+)]\u$1]g&&$_=>`perldoc -qj`'



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

Date: Sat, 2 Sep 2000 20:10:11 +0200
From: sumus@aut.dk (Jakob Schmidt)
Subject: More JAPH (Was: Re: coderef to object method?)
Message-Id: <1egcl01.tscp921ov7ntzN@[192.168.88.117]>

Randal L. Schwartz <merlyn@stonehenge.com> wrote:

>   $x->add_handler(sub { $self->coderef() });

Magnificent! Much better than what I suggested.

I think I just learned something about closures :-)

> print "Just another Perl hacker,"

I'm thinking about that ','... But it seems to me that very few of the
JAPHers use it. Shouldn't there be a newline at the end of the string?

-- 
Jakob
# don't print anything just now


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

Date: 02 Sep 2000 11:28:38 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: More JAPH (Was: Re: coderef to object method?)
Message-Id: <m1og26zm09.fsf@halfdome.holdit.com>

>>>>> "Jakob" == Jakob Schmidt <sumus@aut.dk> writes:

Jakob> Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>> $x->add_handler(sub { $self->coderef() });

Jakob> Magnificent! Much better than what I suggested.

Jakob> I think I just learned something about closures :-)

>> print "Just another Perl hacker,"

Jakob> I'm thinking about that ','... But it seems to me that very few of the
Jakob> JAPHers use it. Shouldn't there be a newline at the end of the string?

Well, as the explanation goes, it's meant literally to replace:

        Just another Perl hacker,

that I was adding just before my .sig.  And yeah, I considered at
least once or twice putting \n at the end, but decided it would mess
up too many opportunities to be cute, since the phrase above is 25
chars, nicely 5x5 for some of the more odd permutations, which I took
advantage of at least once or twice.

@a=split//,"satre crJtnh rhk,u oePlae";print shift@a while push@a,splice@a,0,@a/3

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sat, 2 Sep 2000 21:01:48 +0200
From: sumus@aut.dk (Jakob Schmidt)
Subject: Re: More JAPH (Was: Re: coderef to object method?)
Message-Id: <1egcnem.zt4hk11h3mz9oN@[192.168.88.117]>

Randal L. Schwartz <merlyn@stonehenge.com> wrote:

> >> print "Just another Perl hacker,"
> 
> Jakob> I'm thinking about that ','... But it seems to me that very few of the
> Jakob> JAPHers use it. Shouldn't there be a newline at the end of the string?
> 
> Well, as the explanation goes, it's meant literally to replace:
> 
>         Just another Perl hacker,
> 
> that I was adding just before my .sig.

OK, I see. Also it appears that 'hacker' shouldn't be capitalized as
most have it. I might just as well get it really straight
while ( $i == @it ) # == here pronounced "am" as gramatically correct

> @a=split//,"satre crJtnh rhk,u oePlae";[snip to fit 80]
              ^^^^^
That's so close to "Sartre" it nearly hurts...

-- 
Jakob


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

Date: 02 Sep 2000 16:14:54 EDT
From: abigail@foad.org (Abigail)
Subject: Re: More JAPH (Was: Re: coderef to object method?)
Message-Id: <slrn8r2nn5.8ac.abigail@alexandra.foad.org>

Jakob Schmidt (sumus@aut.dk) wrote on MMDLIX September MCMXCIII in
<URL:news:1egcnem.zt4hk11h3mz9oN@[192.168.88.117]>:
-- Randal L. Schwartz <merlyn@stonehenge.com> wrote:
--
-- > Well, as the explanation goes, it's meant literally to replace:
-- > 
-- >         Just another Perl hacker,
-- > 
-- > that I was adding just before my .sig.
--
-- OK, I see. Also it appears that 'hacker' shouldn't be capitalized as
-- most have it. I might just as well get it really straight
-- while ( $i == @it ) # == here pronounced "am" as gramatically correct

Well, for most JAPHs, the actual capitalization would not change much.
Usually, just a character in a string, and not really how much it works.
As for Randal mentioning "Just another Perl hacker," being 25 chars,
"Just another Perl Hacker" is 24, which decomposes in 2x12, 3x8, 4x6,
6x4, 8x3 and 12x2, much more than just 5x5. But then, "Just another Perl
hacker\n" is 25. ;-)

I've never come up with an idea that uses such decomposition though.
At least, not yet. ;-)

(Hmmm, "Just another Perl hacker,\n" is 26, which is as many letters
 as the alphabet)

-- > @a=split//,"satre crJtnh rhk,u oePlae";[snip to fit 80]
--               ^^^^^
-- That's so close to "Sartre" it nearly hurts...


Abigail
-- 
@;=split//=>"Joel, Preach sartre knuth\n";$;=chr 65;%;=map{$;++=>$_}
0,22,13,16,5,14,21,1,23,11,2,7,12,6,8,15,3,19,24,14,10,20,18,17,4,25
;print@;[@;{A..Z}];


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

Date: Sat, 2 Sep 2000 22:46:12 +0200
From: sumus@aut.dk (Jakob Schmidt)
Subject: Re: More JAPH (Was: Re: coderef to object method?)
Message-Id: <1egcsda.vbqp2h1oblasxN@[192.168.88.117]>

Abigail <abigail@foad.org> wrote:

> (Hmmm, "Just another Perl hacker,\n" is 26, which is as many letters
>  as the alphabet)
> 
> -- > @a=split//,"satre crJtnh rhk,u oePlae";[snip to fit 80]
> --               ^^^^^
> -- That's so close to "Sartre" it nearly hurts...
[...]
> @;=split//=>"Joel, Preach sartre knuth\n";$;=chr 65;%;=map{$;++=>$_}
> 0,22,13,16,5,14,21,1,23,11,2,7,12,6,8,15,3,19,24,14,10,20,18,17,4,25
> ;print@;[@;{A..Z}];

Hey! That's gotta be the fastest gun in town :-)

OK - it's not veeery tricky, but it catches 'sartre', the letters of the
alfabet and some other nice stuff.

Well done!

-- 
Jakob


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

Date: Sat, 2 Sep 2000 18:55:27 -0400
From: kpreid@attglobal.net (Kevin Reid)
Subject: Re: More JAPH
Message-Id: <1egcbh1.t1yy1czms0e8N%kpreid@attglobal.net>

Abigail <abigail@foad.org> wrote:

> (Hmmm, "Just another Perl hacker,\n" is 26, which is as many letters
>  as the alphabet)
<snip>
> -- 
> @;=split//=>"Joel, Preach sartre knuth\n";$;=chr 65;%;=map{$;++=>$_}
> 0,22,13,16,5,14,21,1,23,11,2,7,12,6,8,15,3,19,24,14,10,20,18,17,4,25
> ;print@;[@;{A..Z}];

Phooey. I just wrote this, then noticed your signature:

%_ = split //, 'kecslrr e hooenPaJtashucm fadtprqlbuvkwexry,jhz
itgn'; for ('a'..'z') {print $_{$_}}

-- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.


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

Date: Sat, 2 Sep 2000 18:55:25 -0400
From: kpreid@attglobal.net (Kevin Reid)
Subject: Re: open web file
Message-Id: <1egasjj.umahmxpffndmN%kpreid@attglobal.net>

Abigail <abigail@foad.org> wrote:

<snip discussion of making open() access URLs>
> As for confusing, ask yourself, how often do people have a file called
> "www.slashdot.org" in a directory "http:", while at the same moment writing
> two path separators between directory name and file name. Isn't that a bit
> far fetched?

That would be a more reasonable path on a Macintosh, where it refers to
the file "//www.slashdot.org" on the disk "http".

-- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.


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

Date: 2 Sep 2000 22:06:24 GMT
From: jhi@alpha.hut.fi (Jarkko Hietaniemi)
Subject: Perl 5.7.0
Message-Id: <sr2vu6mbc5d62@corp.supernews.com>

Perl 5.7.0 Has Been Released

	The Librarian had seen many weird things in his time,
	but that had to be the 57th strangest.
	[footnote: he had a tidy mind]
	-- Terry Pratchett, "Moving Pictures"

    The source code is available for example from

	http://www.cpan.org/src/perl-5.7.0.tar.gz
	http://www.perl.com/CPAN/src/perl-5.7.0.tar.gz
        http://ca.cpan.org/src/perl-5.7.0.tar.gz
        http://fi.cpan.org/src/perl-5.7.0.tar.gz
        http://jp.cpan.org/src/perl-5.7.0.tar.gz

    and from all the other CPAN mirror sites under the src/ directory.
    As you can guess from the above list yourcountrycode.cpan.org is
    a good bet, http://www.cpan.org/SITES.html lists all the sites.
	
    Overview of changes is available within the distribution in pod format
    as perldelta (pod/perldelta.pod).  Detailed list of changes is in the
    Changes file.

Perl 5.7.0 Is An Unstable Development Release

    As promised when 5.6.0 came out, Perl 5 has now been clearly
    separated into stable maintenance releases and unstable development
    releases.  Releases with even version numbers (6, 8) will be maintenance
    releases and odd version numbers (7) will be development releases.

    The whole Perl 5.7 branch is a development branch.  Its releases are
    potentially unstable and they are

	NOT meant for production use

    Data corruption and crashes are possible because new not yet fully
    tested features have been introduced.  System administrators should
    NOT install these Perls for their users.  Vendors or organizations
    releasing software packages should NOT package and distribute these
    Perls to their customers or users as a new better Perl distribution.

    If you are looking for a maintenance release, please wait for the
    Perl 5.6.1 release.  It will incorporate the stable bug fixes and
    component upgrades that have gone into 5.7.0.

    Perl 5.7 is for you if you want to help out in developing Perl 5.

The Future of Perl 5

    The Perl 6 project has begun (http://www.perl.org/perl6/) and
    therefore no extensive changes to Perl 5 are expected.  Perl 5
    will continue to be maintained.

Enjoy.

--
Jarkko Hietaniemi <jhi@iki.fi>




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

Date: Sat, 02 Sep 2000 22:17:31 GMT
From: sung <sungfung@yahoo.com>
Subject: perl regex to strip out anything other than a letter or a numb
Message-Id: <puu2rsog0h6cp8tjgol5fg4e56qmai6uis@4ax.com>

Dear all,

I'm trying to strip out anything other than a letter or a number from
a scalar, here's the regex I have:

$test =~ s/[^[a-zA-Z]\d]//g;

It doesn't work. I think it has to do with putting a character class
in an anti character class? I'm not sure.

Thanks,
sung


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

Date: 02 Sep 2000 23:23:48 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: perl regex to strip out anything other than a letter or a numb
Message-Id: <39B189A4.2B8E669F@myself.com>

sung wrote:
> 
> Dear all,
> 
> I'm trying to strip out anything other than a letter or a number from
> a scalar, here's the regex I have:
> 
> $test =~ s/[^[a-zA-Z]\d]//g;
> 
> It doesn't work. I think it has to do with putting a character class
> in an anti character class? I'm not sure.

From the perlre documentation:

Perl defines the following: 

    \w  Match a "word" character (alphanumeric plus "_")
    \W  Match a non-word character  
    \s  Match a whitespace character
    \S  Match a non-whitespace character
    \d  Match a digit character
    \D  Match a non-digit character

More at http://www.perl.com/pub/doc/manual/html/pod/perlre.html


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

Date: Sat, 02 Sep 2000 21:41:06 GMT
From: "Annadani Patil" <leebas@worldnet.att.net>
Subject: Re: perlcc - Compiler errors
Message-Id: <Stes5.7656$On2.484819@bgtnsc04-news.ops.worldnet.att.net>

Thank you for your information re: perlcc compiler errors:

Wes Kempfer we tried the -b option and were able to successfully compile the
code. However we need byteperl to execute the code.
I am not sure whether it is another flavor of perl or it the one that comes
with Perl. I have to find out about that.

Wes Kempfer <wkempfer@lsil.com> wrote in message
news:39AADEB0.21877D88@lsil.com...
>
> This reference is undefined when trying to use the 5.6.0 version of perlcc
under
> Solaris 2.6 also. I've only been able to compile successfully with the -b
> (bytecode) option.
>
>
> >
> > /tmp/ccuWYZpi.o(.text+0x9b10d): undefined reference to `boot_DynaLoader'
>

IN the meantime we tried the the solution as per the message from
kerims@my-deja.com

> perlcc has a bug!
>
> insert 'use DynaLoader;' at line 393 in perlcc
>
> print $fd <<"EOF";
>         use DynaLoader;
>         use FileHandle;
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

It works fine though we get errors about FNCTL. It executes fine. We may not
be using the functions that the compiler complains about and hence no
run-time errors. Thank you both very much for your help





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

Date: Sun, 03 Sep 2000 02:16:01 +0100
From: "Dietmar Staab" <dietmar.staab@t-online.de>
Subject: Re: Q?: alphabetical search
Message-Id: <8os5cg$gbb$17$1@news.t-online.com>

In article <newscache$8eq90g$ls2$1@weblab.ucd.ie>, "gina"
<Gina.Joue@ucd.ie> wrote:
Hi Gina,
 
> I'm fairly new to Perl and was wondering whether there is an efficient
> way to do repeated searches through a dictionary.
> 
> I have a file with words I need to look up in a pronunciation
> dictionary. Both files are huge -- the way I have started to do the
> dictionary lookup seems way too inefficient:

The file accesses are very time consuming and slow - it would be better to
keep the dictionary in memory - in a hash. Only a guess,I assume the
dictionary looks like 

word - explanation1
           explanation2
 ...

Use word as the hash key and if possible, the explanations as the value
(list). If your dictionary is too large, but it's enough memory to keep
the "word" entries in a hash, you could use the file positions in the
dictionary file as values (functions tell, seek).

If the dictionary is too large too keep all word entries in the hash,
you've to work with an index of an index. It's much better to have a small
part of the index that fits in your memory than to read the file line by
line cause it speeds up your seeking.

Hope this helps a bit.

D.
 



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

Date: Sat, 02 Sep 2000 22:53:17 GMT
From: tlynch001@my-deja.com
Subject: Question Perl Cookbook 17.6
Message-Id: <8os0co$hvd$1@nnrp1.deja.com>

Discussion Unix domain sockets

In this line:

$server = IO::Socket::UNIX->new(LocalAddr => "/tmp/mysock",

Is the /tmp/mysock created in the directory where my Perl program is
run from?  Is it created when the application runs?  Could I put
anything in for the LocalAddr?

Thanks,

-tl


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


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

Date: Sat, 02 Sep 2000 21:44:51 GMT
From: Martin H.Ludwig <Martin.H.Ludwig@ing-buero-ludwig.de>
Subject: Return-value of open of nonexisting pipe
Message-Id: <20000902.21445100@biggy.ma.net>

Hello,

I want to use the open-command to open a pipe and to test if the program=

exists. Strange to say open results with a defined return-value even if
the pipe-command does not exists!


#!/usr/bin/perl

$Empf=3D"Martin.H.Ludwig\@ing-buero-ludwig.de";
$mailprog=3D"/usr/sbin/sendmailXX";
$|=3D1;

$xpid =3D open (MAIL, "| $mailprog $Empf");

if ( defined( $xpid ) ) {
  print "Open OK\n";
} else {
  print "Open-Error\n";
}



results everytime =84Open OK=93, although /usr/sbin/sendmailXX does not
exist. $xpid is the PID des Perl-program. Whats wrong?

I=B4ve tested the program with perl 5.0 patchlevel 4 subversion 4 (AIX) =
and
perl 5.0 patchlevel 5 subversion 3 (Linux).

Thanks for your help.

Martin

Martin.H.Ludwig@ing-buero-ludwig.de




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

Date: 02 Sep 2000 19:19:18 EDT
From: abigail@foad.org (Abigail)
Subject: Re: Return-value of open of nonexisting pipe
Message-Id: <slrn8r32lt.8ac.abigail@alexandra.foad.org>

Martin H.Ludwig (Martin.H.Ludwig@ing-buero-ludwig.de) wrote on MMDLIX
September MCMXCIII in <URL:news:20000902.21445100@biggy.ma.net>:
## Hello,
## 
## I want to use the open-command to open a pipe and to test if the program
## exists. Strange to say open results with a defined return-value even if
## the pipe-command does not exists!
## 
## 
## #!/usr/bin/perl
## 
## $Empf="Martin.H.Ludwig\@ing-buero-ludwig.de";
## $mailprog="/usr/sbin/sendmailXX";
## $|=1;
## 
## $xpid = open (MAIL, "| $mailprog $Empf");
## 
## if ( defined( $xpid ) ) {
##   print "Open OK\n";
## } else {
##   print "Open-Error\n";
## }
## 
## 
## 
## results everytime [SCARY CHARACTER]Open OK[SCARY CHARACTER], although /usr/sb
## exist. $xpid is the PID des Perl-program. Whats wrong?

Your reading ability.

This issue is discussed in no less than _three_ places in the Perl
documentation. Including in the tutorial about open().

Study it.

Oh, and don't non-Latin-1 characters in your posting.


Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'
#    A dove in the branches
#    of an elm. A pair of trout
#    swim in the river.


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

Date: Sat, 02 Sep 2000 20:32:57 GMT
From: trio@surffi.saunalahti.fi (Heikki Simperi)
Subject: Re: script problems
Message-Id: <39b1629b.10236288@news.saunalahti.fi>

There are something wrong in your httpd server´s ( Apache?) config
files. Server doesn´t reconice that extension´s files should drive
under perl-debugger before sending output to user´s browser.

In Apache
-----------------

Check does you have this line in your http.conf file, in default it is
commented with #, remove # from start of line:

AddHandler cgi-script .cgi

Any help?


Heikki Simperi
trio@surffi.saunalahti.fi


On Sat, 2 Sep 2000 14:17:22 -0700, "Nabonida$" <nab$@hotmail.com>
wrote:

>every time i try to run one of my scripts i get a the "do you want to
>download this file" message box. the permissions are correct, using post
>from a form.
>never had this problem with any of my other scripts.
>can anyone help me.
>Nab$
>
>



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

Date: Sat, 02 Sep 2000 19:18:42 GMT
From: Brad B <bbollenbach@home.com>
Subject: Re: Setup Factory for Linux?
Message-Id: <39B1512A.FFE44E0@home.com>

Pan wrote:

> Ever hear of RPM?

    Perhaps you missed the concept. I said "for Linux", not "for Redhat (and
the other's that happen to support RPM's)" (and actually, as Abigail pointed
out, and what I really intended/should have said was *nix). The ultimate goal
would be for this program to be independent of Linux distribution or Unix
variant.



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

Date: Sat, 02 Sep 2000 14:12:34 -0500
From: Flounder <japh@flashmail.com>
Subject: Re: Setup Factory for Linux?
Message-Id: <39B15122.63CBD6A7@flashmail.com>

Is it just me or do .rpm and .deb format take care of this on linux?

Brad B wrote:

> Hello,
>
>     I've just stumbled upon what I think to be an interesting idea for a
> project: "Setup Factory" for Linux. At this point my main question is
> feasibilty.
>
>     For those of you who haven't seen the Windows version of it, the
> short answer is that it's a developer's tool used to combine all the
> dependencies necessary for a program into one installation directory and
> create the ever-popular setup.exe to install all of those dependencies.
> In other words, as a developer or as an end-user of the program, it's
> always virtually guaranteed that all the dependencies will be in place.
> For a more detailed explanation (well, a review anyways) of SF5 for
> Windows, see:
>
> http://the-internet-eye.com/reviews2000/Jan/SetupF5/default.htm
>
>     Now admittedly, ./configure; make; make install, often works quite
> dandily. But what about the times that it DOESN'T? =] Unmet
> dependencies, you have to hunt through the README to find out what
> you're missing, find out where to get it, hope that installing those
> packages goes well, and then rerun the ./configure; make; make install
> again. I don't have anything against README's but when it comes to
> merely installing a new program I want as little of my time wasted on
> that aspect as possible.
>
>     So in conclusion, I ask you again: Does this seem like an
> interesting project? Is it feasible? Is it worth doing? Would YOU like
> to have a program like this as a developer?
>
> </thought_provoking>
>
> Brad Bollenbach

--
Flounder

>+++++++[<++++++++++>-]<++++.---------.+.++++.++.





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

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


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