[12490] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6090 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 22 11:07:21 1999

Date: Tue, 22 Jun 99 08:00:22 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 22 Jun 1999     Volume: 8 Number: 6090

Today's topics:
    Re: 2 simple (not to me tho) questions <upsetter@ziplink.net>
    Re: 2 simple (not to me tho) questions (brian d foy)
        [q] Timing of a simple looping cycle PERL vs C <augur@icelord.net>
        A month behind using localtime(time) ? <Mark.Conlin@bridge.bellsouth.com>
    Re: A month behind using localtime(time) ? (Harry Broomhall)
    Re: A month behind using localtime(time) ? (Malcolm Ray)
    Re: Apache + Perl <jcreed@cyclone.jprc.com>
    Re: bulk emailing <ludlow@us.ibm.com>
    Re: Cure for document deficiency <jcreed@cyclone.jprc.com>
    Re: Cure for document deficiency (Andrew Johnson)
    Re: Database Manipulation paulm@dirigo.com
    Re: how to do this in a perl program (Bart Lateur)
    Re: Interpreting MS-ASCII - anyone have a filter? <tchrist@mox.perl.com>
    Re: Language choice for high-volume Oracle CGI interfac <oliver.willandsen@sg.cec.be>
        Looking for very small, basic bulletin board system yvan@wharris.com
    Re: matinal musings and the madrugada (Larry Rosler)
    Re: multidimensional arrays with functions push and pop <d-edwards@uchicago.edu>
        Multiple Fax Server <darrenboyle@callnetuk.com>
        NDS perl <freezej@bms.com>
    Re: Perl Hash-DMB problem <jcreed@cyclone.jprc.com>
    Re: perlcc problem with subroutines <firespring@nfx.net>
    Re: Searching for RegEx in binary files (Tad McClellan)
    Re: sorting on 2 fields (Tad McClellan)
    Re: Statistics for comp.lang.perl.misc (Randal L. Schwartz)
    Re: Statistics for comp.lang.perl.misc (Abigail)
        Strip off file name by s/\\(.*)$// does not work <f.geiger@vol.at>
    Re: Sub Routines Question, Parameters <craig@mathworks.com>
    Re: Sub Routines Question, Parameters (Tad McClellan)
    Re: Sub Routines Question, Parameters <tchrist@mox.perl.com>
        Troubles with find2perl and File::Find <sobek@irit.fr>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 22 Jun 1999 14:34:58 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <maNb3.915$7X1.234128@news.shore.net>

Abigail <abigail@delanet.com> wrote:
: If you don't have the documentation, you don't have Perl.  If you are
: unwilling to get the documentation, don't be so rude to ask your questions
: here. It's your own choice to suffer, don't bother this group.

I think you misspelled "If you don't have the documentation, it's
available online from www.perl.com".

Hope this helps,

--Art
-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Tue, 22 Jun 1999 11:06:43 -0400
From: brian@pm.org (brian d foy)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <brian-ya02408000R2206991106430001@news.panix.com>

In article <slrn7mtmtf.2o8.morpheus@rpglink.com>, morpheus@here.not.there posted:

> On Tue, 22 Jun 1999 00:10:12 GMT, Casey R Tweten <crt@highvision.com> wrote:
> >I agree, in fact, why is that so long?
> 
>     Because I dislike unstrucured code, which is my perogative.  :P

structure has all sorts of forms.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Tue, 22 Jun 1999 18:48:19 +0400
From: Augur the Genius <augur@icelord.net>
Subject: [q] Timing of a simple looping cycle PERL vs C
Message-Id: <Pine.LNX.3.96.990622182831.31976A-100000@localhost>


Hail!

It's not a another war fest but an attempt to understand the way Perl
works. I love Perl, I want to use it more efficient.

Just seeking the best way to optimize Perl scripts for ownself.
Procedures are quite easy: write a simplest programs and time it.

--[a perl snippet d.pl begin]--------------------------
#!/usr/bin/perl
for ($i=1; $i<=5000000; $i++){++$a;} print $a, "\n";
--[a perl snippet d.pl ends]---------------------------

--[a c snippet b.c begin]------------------------------
#include <stdio.h>
main() {long int i,a=0;for (i=1;i<=5000000;i++) a++;printf("%u\n",a);}
--[a c snippet b.cl ends]------------------------------

Here is a question: is there any best method to do this loop on perl?

%time perl d.pl
5000000
13.59user 0.02system 0:13.79elapsed 98%CPU\
(0avgtext+0avgdata0maxresident)k
0inputs+0outputs (185major+20minor)pagefaults 0swaps

// optimized for gcc -O6 b.c -o b
%time b
5000000
Command exited with non-zero status 8
0.05user 0.02system 0:00.06elapsed 112%CPU\
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (54major+8minor)pagefaults 0swaps

// optimized for gcc -O2 b.c -o b1
%time b1
5000000
Command exited with non-zero status 8
0.23user 0.01system 0:00.24elapsed 98%CPU\
(0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (54major+8minor)pagefaults 0swaps

// linux p200 w/o mmx box; on UltraSparc 5 seems the same proportion

Don't you think that 14 seconds for a perl variant is too far against even
0.25sec for .c variant? 

NB: CC: to my e-mail, please
-
Dmitry Teplitsky (augur@icelord.net)



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

Date: Tue, 22 Jun 1999 10:20:21 -0400
From: Mark Conlin <Mark.Conlin@bridge.bellsouth.com>
Subject: A month behind using localtime(time) ?
Message-Id: <376F9BA5.11A9A804@bridge.bellsouth.com>

($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime(time);


When I use this command I end up with $mon, being 5, correct me if 
I am wrong but it is June isn't. No big deal I just add one, I was
just wondering why PERL does this.

Does that mean that January is $mon 0 ?

Mark


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

Date: 22 Jun 1999 14:35:59 GMT
From: haeb@haeb.noc.easynet.net (Harry Broomhall)
Subject: Re: A month behind using localtime(time) ?
Message-Id: <7ko70f$o9r$1@quince.news.easynet.net>

In article <376F9BA5.11A9A804@bridge.bellsouth.com>,
	Mark Conlin <Mark.Conlin@bridge.bellsouth.com> writes:
> ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
> localtime(time);
> 
> 
> When I use this command I end up with $mon, being 5, correct me if 
> I am wrong but it is June isn't. No big deal I just add one, I was
> just wondering why PERL does this.

   Sigh - why not read the docs to see why this is so?  
It uses the underlying C library which does the same thing - also
documented.

> 
> Does that mean that January is $mon 0 ?

  Yes.  Note that this means that an array of month names can be
used directly without having to adjust the value.

  Regards,
     Harry.



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

Date: 22 Jun 1999 14:44:21 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: A month behind using localtime(time) ?
Message-Id: <slrn7mv8a5.2ss.M.Ray@carlova.ulcc.ac.uk>

On Tue, 22 Jun 1999 10:20:21 -0400, Mark Conlin
<Mark.Conlin@bridge.bellsouth.com> wrote:
>($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
>localtime(time);
>
>
>When I use this command I end up with $mon, being 5, correct me if 
>I am wrong but it is June isn't. No big deal I just add one, I was
>just wondering why PERL does this.
>
>Does that mean that January is $mon 0 ?
>
>Mark

perldoc -f localtime

This will also tell you what year it is, which will be important next
year.

Stop programming by guesswork, or take up another trade.
-- 
Malcolm Ray                           University of London Computer Centre


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

Date: 22 Jun 1999 10:40:03 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: Apache + Perl
Message-Id: <a14sk0uwn0.fsf@cyclone.jprc.com>

Dave Cross <dave@dave.org.uk> writes:

> > My question is, will setting up Apache on my workstation effect Windows
> > on any way. In other words can they both be installed on the same
> > machine without destroying each other.
> 
> Apache is an application. It runs under Windows. Why would it affect
> Windows? Or vice versa?

Sunday! Sunday! Sunday!

One night only!

Steel cage match!

WINDOWS!

VS!

APACHE!

[sfx: explosion]

Witness the culmination of the eternal struggle
between Operating System* and Application!

Only ONE will survive!

THE OTHER WILL BE DESTROYED!

(contactyourlocalticketmasterfordetails)

And don't forget! Next week!

PERL VS. CGI!

---Jason

* technically innaccurate, in this case


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

Date: Tue, 22 Jun 1999 09:34:20 -0500
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: bulk emailing
Message-Id: <376F9EEC.4885B348@us.ibm.com>

Dani Koesterich wrote:

[snip]
> attached the script to the end of this message, and if anyone could tell me
> how to make sure the email address works before sending out the mail, I
> would be very appreciative.  Thank You.
[snip]

This is a FAQ (perlfaq9).

http://language.perl.com/newdocs/pod/perlfaq9.html#How_do_I_check_a_valid_mail_addr

-- 
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)


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

Date: 22 Jun 1999 09:54:06 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: Cure for document deficiency
Message-Id: <a17lowuyrl.fsf@cyclone.jprc.com>

TRG Software : Tim Greer <webmaster@chatbase.com> writes:

> Perhaps it's time to develop a chip to implant in their brains? Just the
> docs and charge a small amount for uploading the new information. Just
> an idea. I'm not sure what else to offer, other then "programming" it
> into their brains, nothing else seems to work.

Hi, I'm new to this whole brain-programming thing, and I want
to know how to use a neuron as the name of another neuron.
Can I do this, and if so, how?

---Jason


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

Date: Tue, 22 Jun 1999 14:42:47 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Cure for document deficiency
Message-Id: <HhNb3.120$q6.3749@news2.rdc1.on.home.com>

In article <a17lowuyrl.fsf@cyclone.jprc.com>,
 Jason Reed <jcreed@cyclone.jprc.com> wrote:
! TRG Software : Tim Greer <webmaster@chatbase.com> writes:
[snip] 
! > an idea. I'm not sure what else to offer, other then "programming" it
! > into their brains, nothing else seems to work.
! 
! Hi, I'm new to this whole brain-programming thing, and I want
! to know how to use a neuron as the name of another neuron.
! Can I do this, and if so, how?

Sure you can, but its a really bad idea ... you'll be much 
happier using a hash for brains instead.

regards
andrew 
(who suspects neuro-symbolic references may be at the root of his
own namespace collisions and accidental data loss).


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

Date: Tue, 22 Jun 1999 13:38:18 GMT
From: paulm@dirigo.com
Subject: Re: Database Manipulation
Message-Id: <7ko3k9$904$1@nnrp1.deja.com>

Well, the forecast is now viewable and it's pulling live data from our
database.  I was able to dynamically create a submit button on the
viewed forecast.  I want this submit button to run a different script
that basically takes all the rows that the user has selected (via
checkbox) and put them into "EDIT" mode.

I'm not sure where to start with the script, but I know that I want to
take the rows and put each cell of the table into a textbox so that
they can edit it.  I know the Perl script will have to have an SQL
string that contains the UPDATE string, but just not sure where to
start.  Have any ideas?

Thanks in advance.

In article <376F80F6.C7869E54@mathworks.com>,
  Craig Ciquera <craig@mathworks.com> wrote:

> Have you tried anything?  Do you have a specific question??
>
> I'll be glad to try and answer any questions you may have.
>
> Craig


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


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

Date: Tue, 22 Jun 1999 14:51:21 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: how to do this in a perl program
Message-Id: <3771a190.5382924@news.skynet.be>

Jim Bell wrote:

>How can I do something like this in a perl CGI program:
>
>#,,, blah,blah
>when a user hits the submit button, the corresponding
>cgi program will take the user to a page  which says
>" This will take about ten minutes, please wait..." immediately.
>At the same time, the cgi program works some data processing.

Yup, seems familiar. I've seen it in one of Randal's WebTechniques'
columns.

	http://www.stonehenge.com/merlyn/WebTechniques/

If you're in a hurry, go directly to column # 20. But look around,
Randal's a good and entertaining teacher.

	Bart.


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

Date: 22 Jun 1999 08:14:16 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Interpreting MS-ASCII - anyone have a filter?
Message-Id: <376f9a38@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    gazelle@interaccess.com writes:
:I was wondering if anyone had actually done a full-implementation of
:this idea - that is, one that is aware of all the MS funny chars, and
:deals with each appropriately.  I'm open to either an AWK or PERL (or,
:lex, for matter) solution...

http://language.perl.com/misc/demoroniser.html

#!/bin/perl -0777pw

#           De-moron-ise Illegal Text and HTML from Microsoft Applications
#
#                   by John Walker -- January 1998
#                      http://www.fourmilab.ch/
#                   revised by Larry Rosler -- May 1999
#                       http://www.hpl.hp.com/personal/Larry_Rosler/
#                   sed-ified by Tom Christiansen -- May 1999
#                       tchrist@perl.com
#                   See also
#                      http://language.perl.com/misc/ms-ascii.html
#
#               This program is in the public domain.

use strict;
my %tr;

#   Eliminate idiot MS-DOS carriage returns from line terminator.
#   See also http://language.perl.com/ppt/ for other cpm2linux
#   conversion tools.
s/[\015\012]+/\n/g;

#   Supply missing semicolon at end of numeric entity if
#   Billy's bozos left it out.
#   Map characters in entities.
s/&#(\d+);?/
     $tr{chr $1} || ($1 < 0x80 || $1 > 0x9F ? "&#$1;" : chr $1)/ge;

#   Now check for any remaining untranslated characters.
my $iline = 1;
$1 eq "\n" ? ++$iline : printf STDERR
   "$0: warning -- untranslated character 0x%.2X in line $iline of `%s'\n",
         ord $1, ($ARGV eq '-' ? 'standard input' : $ARGV)
             while /([\x00-\x08\n\x10-\x1F\x80-\x9F])/g;

#   Fix unquoted non-alphanumeric characters in table tags.
s@(<T(?:ABLE|D|H)\s.*?WIDTH\s*=\s*)(\d+%)@$1"$2"@gis;

#   Correct PowerPoint mis-nesting of tags.
s@(<FONT\s[^>]*>\s*<STRONG>.*?) (</FONT>) (\s*) (</STRONG>)
 @$1$4$2$3@gisx;

#   Translate bonehead PowerPoint misuse of <UL> to achieve
#   paragraph breaks.
s@<(?:P|/UL)>\s*<UL>@<P>@gi;
s@</UL>\s*</P>@@gi;

#   Repair PowerPoint depredations in "text-only slides"
s@<P></P>@@gi;
s@ (<TD HEIGHT=100)@ <TR>$1@gi;
s@<LI>(?=<H2>)@@gi;

#   Repair idiotic double breaks
s@<BR>(?:\s*<BR>)+@<P>@gi;

BEGIN {

     %tr = (
         #   Fix dimbulb obscure numeric rendering of & < >.
         chr 38  => '&',
         chr 60  => '<',
         chr 62  => '>',

         #   Map strategically incompatible non-ISO characters in the
         #   range 0x82 -- 0x9F into plausible substitutes where
         #   possible.
         "\x82"  => ',',
         "\x83"  => '<em>f</em>',
         "\x84"  => ',,',
         "\x85"  => '...',

         "\x88"  => '^',
         "\x89"  => '0/00',

         "\x8B"  => '<',
         "\x8C"  => 'Oe',

         "\x91"  => '`',
         "\x92"  => "'",
         "\x93"  => '"',
         "\x94"  => '"',
         "\x95"  => '*',
         "\x96"  => '-',
         "\x97"  => '--',
         "\x98"  => '<sup>~</sup>',
         "\x99"  => '<sup>TM</sup>',

         "\x9B"  => '>',
         "\x9C"  => 'oe',
     );

}

-- 
    What I tell you three times is true.


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

Date: Tue, 22 Jun 1999 13:03:29 GMT
From: Oliver Willandsen <oliver.willandsen@sg.cec.be>
Subject: Re: Language choice for high-volume Oracle CGI interface?
Message-Id: <7ko1ir$88g$1@nnrp1.deja.com>

In article <376BC09F.3BDF0004@well.com>,
  Greg McCann <gregm@well.com> wrote:
> We're doing a proposal for a system doing high-volume financial
transactions on
> the internet.  We're expecting 10,000 transactions per day at the
beginning, up
> to 1,000,000 transactions per day eventually.  The client has
specified an
> Oracle database with an NT web server, using SSL for secure
communications both
> between the browser client and our server and between remote servers
and our
> main server.
>
> We're debating what language to use for the CGI programming.  C++,
Java, Perl,
> ...?  I have some experience using Perl for database access, but not
with Oracle
> or on a system as large as this.  Do you have any thoughts on the
relative
> merits of these languages for this application?  If possible, we would
like to
> follow a path which wouldn't lock us in to a Microsoft platform.
>
> Thanks,
>
> Greg
>
Greg,

there are of course any number of solutions out there - including
Microsoft ones, but also including Sun ( Netdynamics ), Netscape, BEA
Weblogic( who have transactional experience with Tuxedo, of course ),
IBM Websphere, Oracle Appserver and others. The three products which
stand out from the rest, however, and bearing in mind the proviso of not
wanting to be locked into a Microsoft only environment, are Jaguar CTS
by Sybase, the Inprise AppServer, and Silverstream.

All of these will be able to deal with both COM and CORBA components (
allowing for C++ objects ), as well as EJB ( Enterprise Java Beans ) in
their latest releases available later this year. All will allow for
2-phase commits, which is of course essential, especially for financial
transactions. The Inprise offering uses the Visigenics Orb, Sybase have
their own and Silverstream have a strategic partnership with IONA.

Silverstream has a strong development and management team with people
formerly with Powersoft, Lotus and Watermark - amongst which some of the
best people in programming today.

Inprise/Borland has traditionally very strong skill in development tools
and with their Visigenics subsidiary a good ORB.

Sybase have no mean tools either ( PB 7, PowerJ ) and their Jaguar CTS
is the most flexible ( you can even do COM to COM communication over
IIOP )

All three provide their solution on Solaris and NT and _will_ port to
Linux at some stage.


Check out the different offerings :

For Jaguar CTS ( part of Enterprise Application Studio ) by Sybase at

http://www.sybase.com/products/easerver
http://www.sybase.com/products/easerver/collateral.html
http://dynamic.sybase.com/press_releases/press_releases/ExternalItem/0,1
099,21500,00.html ( press release )

http://www.sybase.com:80/products/eastudio/seminar_info.html
http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001058

The latter let's you download a 180 page book entitled
'Building Internet and Enterprise Applications -
Enterprise Application Studio'

For Silverstream, have a look at
http://www.silverstream.com/website/SilverStream/Pages/home.html

For the Inprise AppServer, have a look at

http://www.inprise.com/appserver
http://www.inprise.com/appserver/papers/ejb ( white paper)


Should you want more 'independent' information - send me an email


Regards
--
Oliver Willandsen [ European Commission - http://europa.eu.int ]

All comments represent my own opinion and may not in any circumstance
be regarded as stating an official position of the European Commission


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


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

Date: Tue, 22 Jun 1999 13:42:37 GMT
From: yvan@wharris.com
Subject: Looking for very small, basic bulletin board system
Message-Id: <7ko3sa$93u$1@nnrp1.deja.com>

I need a very small and basic bulletin board system for use in a web
page.  What I would like is a cgi script that would allow me to do the
following:

You visit a page, and at the bottom of that page, there's name form
field, a text box, and a submit button.  When you enter your name and
message, and then click the submit button, the page would automatically
reload itslef, and the name and message that was just entered would be
displayed at the bottom of the SAME html page.  This cgi script would
have to basically append the entered information to the html file and
then overwrite it.  I need no threading functionality, or complex
administration features, .. just what's described above.  Would anyone
here know where I might find a script that would allow me to do this?
Your assistance would be much appreciated.

thanks,
-- yvan@wharris.com


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


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

Date: Tue, 22 Jun 1999 07:28:44 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: matinal musings and the madrugada
Message-Id: <MPG.11d93d625f1b1d97989c18@nntp.hpl.hp.com>

In article <376F4901.A24D608A@ericsson.com> on Tue, 22 Jun 1999 09:27:45 
+0100, Matt Sergeant <matt.sergeant@ericsson.com> says...
> Gregory Snow wrote:
> > In article <376f006e.241042270@news.insnet.net>,
> > David Cantrell <NukeEmUp@ThePentagon.com> wrote:
> > >  Having said that, I
> > >always use YYYYMMDD when there is nothing better easily available.  It
> > >makes that code easier for those who have to maintain it later, and
> > >prevents _me_ from making incorrect assumptions when coding at 4
> > >o'clock in the morning.
> > 
> > But that has y10k problems
> 
> Only if you truncate years > 9999

Or if you sort lexicographically instead of numerically. 

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


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

Date: Tue, 22 Jun 1999 14:35:43 GMT
From: Darrin Edwards <d-edwards@uchicago.edu>
Subject: Re: multidimensional arrays with functions push and pop
Message-Id: <tgd7yoi9q8.fsf@noise.bsd.uchicago.edu>

lr@hpl.hp.com (Larry Rosler) writes:

> No.  You don't want it here.
> 
> #!/usr/local/bin/perl -w
> use strict;
> 
> my @myarray = ([]) x 3;

Thank you for pointing that out.  For some reason, at the
time I thought that "wouldn't be a problem" for an empty list.
Of course, now I have no idea _why_ I thought that, since it
seems so obvious in light of...

> print "@myarray\n";
> 
>    @myarray = map [] => 1 .. 3;
> 
> print "@myarray\n";
> __END__
> 
> Output:
> 
> ARRAY(0x11c1e10) ARRAY(0x11c1e10) ARRAY(0x11c1e10)
> ARRAY(0x11c1e1c) ARRAY(0x11c6c84) ARRAY(0x11c6cb4)

 ... examples like this.

> I made the same mistake in this newsgroup a few weeks ago, so I'll never 
> forget!

Humph.  You think that's funny?  No, the _funny_ part is that in
what I use Perl for, I _never_ need to use "x", but rely on map
almost daily.  How's that saying go, "Learn what you know, share
what you don't"?  Sheesh.

My apologies to the original poster.

Darrin


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

Date: Tue, 22 Jun 1999 15:25:20 +0100
From: "Darren Boyle" <darrenboyle@callnetuk.com>
Subject: Multiple Fax Server
Message-Id: <376f9e8c@eeyore.callnetuk.com>

Can anyone help?

I am being converted by a friend to using Linux rather than NT, since I
understand that Linux is more stable, which is very desirable for my needs.

I am constructing a multiple server fax system, consisting of 15 fax
servers each with 8 modems connected. I have found a Linux program called
Hylafax which can be found at ftp.sgi.com and would like to use this
rather than a similar product (called BroadFax) on NT.

The Linux software is great for a single user system to desktop fax, but
what the NT product offers is a way of distributing the database of fax
numbers between the 15 machines automatically.

I've been told that a fairly straightforward Perl script should be able
to add this missing feature, but I have not got a clue on how to do it
myself.

I can offer payment to anyone who can help me with this problem.

Many thanks,
Darren

darren_boyle@yahoo.com




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

Date: Tue, 22 Jun 1999 10:22:15 -0400
From: John L Freeze <freezej@bms.com>
Subject: NDS perl
Message-Id: <376F9C17.C3887094@bms.com>

Is anyone using perl to manipulate the nds tree????



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

Date: 22 Jun 1999 10:03:10 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: Perl Hash-DMB problem
Message-Id: <a1674guych.fsf@cyclone.jprc.com>

TC <tcthiel@athenet.net> writes:

> Where, I should get 5 for both. It's like the dbm file doesn't
> understand how to store the array in the hash. Is this a known problem?
> Thanks in advance,  -Todd
Known, but not a problem.
Try MLDBM.

---Jason


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

Date: Tue, 22 Jun 1999 14:43:48 GMT
From: Rick Johnson <firespring@nfx.net>
Subject: Re: perlcc problem with subroutines
Message-Id: <376FA1DB.12D89B8@nfx.net>

Hello Steffan,

Thanks for yout reply, but no, I don't have the broken Linux Perl. Perl
itself, and all my noncompiled scripts work fine. It is only the
scripts compiled with perlcc that don't run, and I still don't
understand why. Any further help you could offer would be appreciated.

Rick J.
firespring@nfx.net

Steffen Beyer wrote:
> 
> In article <376D0A41.78197D55@nfx.net>, Rick Johnson <firespring@nfx.net> wrote:
> 
> > I just started attempting to use perlcc with Redhat Linux 5.2 on an
> > Intel platform (Pentiume 133) and wondered if someone could help me
> > with a problem. Specifically, my perl code seems to compile okay using
> > perlcc, but it won't run. What is SEEMS to be choking on is
> > subroutine calls, even though it tells me the syntax of my code
> > was okay during the compile phase. What I get when I run my code
> > is a "segmentation fault" and a core dump. Note: I am NOT using any
> > modules and I have tested the problem by using a simple program which
> > does nothing except call a subroutine which prints "hello world".
> 
> Maybe you have that Linux Distribution with the broken Perl installation
> I've heard rumors about.
> 
> Maybe you should try compiling Perl yourself!
> 
> Good luck!
> 
> Regards,
> --
>     Steffen Beyer <sb@engelschall.com>
>     http://www.engelschall.com/u/sb/whoami/
>     http://www.engelschall.com/u/sb/download/
>     http://www.perl.com/CPAN/authors/id/STBEY/
>     http://www.oreilly.de/catalog/perlmodger/bnp/


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

Date: Tue, 22 Jun 1999 04:45:49 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Searching for RegEx in binary files
Message-Id: <tfink7.vsu.ln@magna.metronet.com>

Rutzmoser Stefan (Rutzmoser@SANIX.de) wrote:

: I have binary files with strings in it.

: The relevant lines of code are:

: open(FILE,"<$filename");


   You should *always* check the return value from open():

      open(FILE, $filename) || die "could not open '$filename'  $!";

   The double quotes serve no purpose.

   The < is not needed.


: binmode FILE;
: @File = <FILE>;


   The concepts of "lines" and "binary file" don't go together.

   Maybe you want to slurp the whole thing into a single 
   scalar instead?


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 22 Jun 1999 04:37:07 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: sorting on 2 fields
Message-Id: <jvhnk7.vsu.ln@magna.metronet.com>

Larry Rosler (lr@hpl.hp.com) wrote:
: In article <2hmmk7.24u.ln@magna.metronet.com> on Mon, 21 Jun 1999 
: 20:48:34 -0400, Tad McClellan <tadmc@metronet.com> says...
: ....
: >              sort { $b->[1] cmp $a->[1]  ||   # wins
: >                     $b->[3] cmp $a->[3]  ||   # ties
: >                     $b->[4] cmp $a->[4]       # points
: >                   }
: >              map  { [ $_, split /\|/ ] } @data;
: ....
: > __DATA__
: > TeamB|11|4|1|435
: > TeamA|11|4|1|430
: > TeamC|12|4|0|465
: ....
: >    You should mess around with this some and see what happens.
: > 
: >    What happens if you switch the "$b"s to "$a"s (and vice versa)?
: ....

: What happens if one of the teams has only 9 wins instead of 11 or 12?


   It stops working.

   As always, the advice you get on Usenet is worth what you pay for it.


: [Possibly your brain turns into a pumpkin at 20:48:34.  :-]


   I forgot to fix the cut/pasted code.

   Sorry.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 22 Jun 1999 07:15:59 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <m1ogi8l3s0.fsf@halfdome.holdit.com>

>>>>> "Greg" == Greg Bacon <gbacon@itsc.uah.edu> writes:

Greg> That's beatable too.  What if she uses different prefixes for each
Greg> quoted line?

Maybe Abi deserves to be taken out of the normal mix, and given an
honorary "automatically historically excessive" OCR place in the
standings.  Item # 0 or something. :)

Maybe what I'm really saying is I don't understand if Abi is using
different prefixes just to foul up statistics, or what.  And if so,
the stats should just ignore her.  And I don't like having that kind
of confusion in my life. :)

print "Just another confused Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 22 Jun 1999 09:12:16 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <slrn7mv6dp.k1b.abigail@alexandra.delanet.com>

Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXI September MCMXCIII in
<URL:news:377077b3.4718606@news.skynet.be>:
0> 
1>  The only way to beat that, is to use more than one quoting prefix in one
2>  post, which *definitely* is bad Usenet prectise, and qhould be frowned
3>  upon, as it will no longer be easily identifiable as quoting, for the
4>  human reader, also.


I don't think it's hard to identify what is quoted and what isn't.



Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 22 Jun 1999 16:20:13 +0200
From: "Franz GEIGER" <f.geiger@vol.at>
Subject: Strip off file name by s/\\(.*)$// does not work
Message-Id: <7ko61l$lvr$1@pollux.ip-plus.net>

I wanted to strip off the file name from a fully qualified file name which
should result in the directory name.

I thought "s/\\(.*)$//" would do it. I read this as "find a backslash
followed by zero or more characters, but begin searching from the end of the
string".

But other than expected "C:\dirname\filename.ext" is converted into "C:". To
me it seems as if the "$" does not work as expected. Or is it the
"greedyness" of RegExp which causes this. I tried to place a "?" after the
"$" but that did not help either.

What I want to do could be achieved by split() or by basename(), but I
really wonder how to do it with RegExp as I really want to master it.

Thanks in advance and best regards
Franz GEIGER


--

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.





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

Date: Tue, 22 Jun 1999 10:02:53 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Sub Routines Question, Parameters
Message-Id: <376F978D.52E55E2B@mathworks.com>

Franklin Edward Sadler wrote:

>
> If this is they way do u have to do anything in the sub routine to take in
> these variables? Any help would be appreciated.

getArray( $a, $b );

sub getArray {
    $a = shift;
    $b = shift;

}

or

sub getArray {
    ($a, $b) = @_;

}

Craig



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

Date: Tue, 22 Jun 1999 05:23:03 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Sub Routines Question, Parameters
Message-Id: <nlknk7.83v.ln@magna.metronet.com>

Franklin Edward Sadler (gte482i@prism.gatech.edu) wrote:

: Alright, another quick question. 


   Alright, another quick question that is answered in the
   standard docs that are already on your hard disk!

   You are expected to look there *before* posting.

   Usenet is not a "read the docs to me" service.


: How do you pass variables into sub
: routines? 


   The way it says to in perlsub.pod would be best.


: If this is they way do u have to do anything in the sub routine to take in
: these variables? 


   from the 3rd paragraph in perlsub.pod:

      "Any arguments passed to the routine come in as the array @_."


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 22 Jun 1999 08:33:33 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Sub Routines Question, Parameters
Message-Id: <376f9ebd@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    Franklin Edward Sadler <gte482i@prism.gatech.edu> writes:
:Alright, another quick question. How do you pass variables into sub
:routines? 

% man perlsub || kill -1 -1

--tom
-- 
    Randal said it would be tough to do in sed.  He didn't say he didn't
    understand sed.  Randal understands sed quite well.  Which is why he
    uses Perl.   :-)  -- Larry Wall in <7874@jpl-devvax.JPL.NASA.GOV>


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

Date: 22 Jun 1999 15:48:37 +0200
From: Ralph SOBEK <sobek@irit.fr>
Subject: Troubles with find2perl and File::Find
Message-Id: <au674g1h3e.fsf@irit.fr>


This concerns perl 5.00502!
I am trying to convert a find shell-script to perl.  I used the
find2perl that came with perl 5.00502.  It produced something akin to:

find('.');

sub wanted {
    /^\.snapshot$/ &&
    ($prune = 1)
    ||
    ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
    -f _ &&
    ! /^\.checksum.*$/ &&
    &exec(0, '/usr/ucb/sum','{}') &&
    &ls;
}

sub exec {
    local($ok, @cmd) = @_;
    my $sum;
    foreach $word (@cmd) {
	$word =~ s#{}#$name#g;
    }
    if ($ok) {
	local($old) = select(STDOUT);
	$| = 1;
	print "@cmd";
	select($old);
	return 0 unless <STDIN> =~ /^y/;
    }
    chdir $cwd;         # sigh
    system @cmd;
    chdir $dir;
    chdir $opt_dir;		# sigh
}

This creates $cwd, which seems to be disconnected from File::Find.
Basically, this loses the current directory and ends up in my home
directory.

If, according to the book, I change the find to:

find(\&wanted, $opt_dir);

(Yes, I also modified this to take an argument.)

Then I get at the beginning of Find's execution:

Can't stat CODE(0x1a8474): No such file or directory
        File::Find::find_opt('HASH(0x2a8a8c)', 'CODE(0x1a8474)', .) called at /usr/local/lib/perl5/5.00502/File/Find.pm line 202
        File::Find::find('CODE(0x1a8474)', 'CODE(0x1a8474)', .) called at /usr/local/lib/perl5/5.00502/find.pl line 44
        main::find('CODE(0x1a8474)', .) called at /home/sobek/bin/docheck1.pl line 41
File::Find::find_opt(/usr/local/lib/perl5/5.00502/File/Find.pm:94):
94:             (($topdev,$topino,$topmode,$topnlink) =
95:               ($Is_VMS ? stat($topdir) : lstat($topdir)))
96:               || (warn("Can't stat $topdir: $!\n"), next);

CODE(0x1a8474) is my &wanted subroutine.

Afterwards, it works somewhat properly!

By the way, the original find script is:

find ${1:-.}/ -name .snapshot -prune -o -type f ! -name ".checksum*" \
        -exec /usr/ucb/sum {} \; -ls

Any suggestions.

Please reply by e-mail, if at all possible, and I will summarize to
the net if interest warrants, since I do not know how quickly our
server recycles this newsgroup.

A nice weekend to all,

	--Ralph
-- 
Dr. Ralph P. Sobek		  Disclaimer: The above ruminations are my own.
Ralph.Sobek@irit.fr			   Addresses are ordered by importance.
sobek@irit.fr						If all else fails, try:
newsmaster@irit.fr, postmaster@irit.fr             sobek@diva.eecs.berkeley.edu
Ph:(+33)[0]561558618  FAX:(+33)[0]561556258  http://www.irit.fr/~Ralph.Sobek/
===============================================================================
Urgent!! Greenhouse Effect: http://www.irit.fr/~Ralph.Sobek/greenhouse.html

-- 
Dr. Ralph P. Sobek		  Disclaimer: The above ruminations are my own.
Ralph.Sobek@irit.fr			   Addresses are ordered by importance.
sobek@irit.fr						If all else fails, try:
newsmaster@irit.fr, postmaster@irit.fr             sobek@diva.eecs.berkeley.edu
Ph:(+33)[0]561558618  FAX:(+33)[0]561556258  http://www.irit.fr/~Ralph.Sobek/
===============================================================================
Urgent!! Greenhouse Effect: http://www.irit.fr/~Ralph.Sobek/greenhouse.html


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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