[8710] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2327 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 15 10:07:14 1998

Date: Wed, 15 Apr 98 07:00:32 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 15 Apr 1998     Volume: 8 Number: 2327

Today's topics:
    Re: Bill Gates should be invited to O'Reilly's "Free So (Chris Nandor)
        compiling with 'sfio' <hilljere@pilot.msu.edu>
        core dump on autosplit <zkessin@lhr-sys.dhl.com>
    Re: embed Perl in Java (Alan Jarvis)
        error with mirror.pl <hausi@takefive.co.at>
    Re: Hide or Encrypt perl source code <Mike_Lacey@Cargill.Com>
        How can I avoid double quotes in regex? They make a mes (Matija Grabnar)
    Re: How can I avoid double quotes in regex? They make a <jdf@pobox.com>
    Re: How to execute more than one command via System (Vaclav Kulakovsky)
        How to insert a \n each... <lecorre@magic.fr>
    Re: Ideas for installations <mbunks@coincnx.com>
    Re: info on cookies <ljz@asfast.com>
    Re: IO::Handle error. <gbarr@ti.com>
    Re: looking for a good win32 perl editor. (Stuart McDow)
    Re: Numeric validation (John Klassa)
    Re: Numeric validation (John Klassa)
    Re: Numeric validation (Frank D. Cringle)
    Re: Obfusticator <Dave.Cross@gb.swissbank.com>
    Re: OOPS and several parents <jdporter@min.net>
    Re: Perl 5.004_64 Slower??? (Dominic Dunlop)
    Re: Perl and DOS Console on Win32 <jwilson@ic.ac.uk>
    Re: problems with crypt <barnett@houston.Geco-Prakla.slb.com>
        Q: Pattern matching <pidde@uni-koblenz.de>
    Re: Q: Pattern matching (Honza Pazdziora)
        What to use for simple database ? <mferg@hal.ddntl.didata.co.za>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 15 Apr 1998 07:43:09 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Bill Gates should be invited to O'Reilly's "Free Software Summit" (was Re: RMS should be invited to O'Reilly's "Free Software Summit")
Message-Id: <pudge-1504980743100001@ppp-36.ts-1.kin.idt.net>

In article <353466C5.27F6EDDD@hayamasa.demon.co.uk>, Ben Bullock
<ben@hayamasa.demon.co.uk> wrote:

# I don't think so: I think they're annoyed with me because
# they disagree with my opinions but they can't get the better of
# me in this discussion.

I think we've seen the better of you, and we're just disappointed.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#


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

Date: Wed, 15 Apr 1998 08:54:47 -0400
From: Jeremy Hill <hilljere@pilot.msu.edu>
Subject: compiling with 'sfio'
Message-Id: <3534AE17.533E2D14@pilot.msu.edu>

Greetings,
	I need to compile perl with 'sfio' for a 
perl script I need to get working.  I've tried
"./Configure -Duseperlio -Dusesfio" to no avail.
Does anyone know what I am missng here? Thanks for
any advice.

Jeremy Hill.


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

Date: 15 Apr 1998 11:36:39 +0100
From: Zachary Kessin <zkessin@lhr-sys.dhl.com>
Subject: core dump on autosplit
Message-Id: <u3eff5q2w.fsf@lhr-sys.dhl.com>



I am using Perl 5.004 on HP-UX 10.20 and am having an interesting
problem when I try to compile a module (Or recompile perl itself, I
get a core dump on autosplit. Does anyone know why this is happening
or how to stop it?


--Zach Kessin:

AutoSplitting Text::ParseWords (lib/auto/Text/ParseWords)
sh: 25187 Memory fault(coredump)
*** Error exit code 139

perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
  Platform:
    osname=hpux, osvers=10, archname=PA-RISC2.0
    uname='hp-ux webdev b.10.20 a 9000871 2002696789 two-user license '
    hint=previous, useposix=true, d_sigaction=define
    bincompat3=y useperlio=undef d_sfio=undef
  Compiler:
    cc='gcc', optimize='-O', gccversion=2.8.1
    cppflags='-D_HPUX_SOURCE -I/usr/local/include -I/opt/local/include -D_POSIX_
    ccflags ='-D_HPUX_SOURCE -I/usr/local/include -I/opt/local/include -D_POSIX_
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    voidflags=15, castflags=0, d_casti32=define, d_castneg=define
    intsize=4, alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib/pa1.1 /lib /usr/lib /usr/ccs/l
    libs=-lnet -lnsl_s -lndbm -lgdbm -ldld -lm -lc -lndir -lcrypt
    libc=/lib/libc.sl, so=sl
    useshrplib=true, libperl=libperl.sl
  Dynamic Linking:
    dlsrc=dl_hpux.xs, dlext=none, d_dlsymun=undef, ccdlflags='-Wl'
    cccdlflags='-fpic', lddlflags='-b -L/usr/local/lib -L/opt/local/lib'


Characteristics of this binary (from libperl):
  Built under hpux
  Compiled at Apr  1 1998 11:32:10
  %ENV:
    PERL="/usr/bin/perl.new"
  @INC:
    /opt2/perl5/lib/PA-RISC2.0/5.00404
    /opt2/perl5/lib
    /opt2/perl5/lib/site_perl/PA-RISC2.0
    /opt2/perl5/lib/site_perl


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

Date: Wed, 15 Apr 1998 12:35:45 GMT
From: ajarvis@netcomuk.co.uk (Alan Jarvis)
Subject: Re: embed Perl in Java
Message-Id: <3534a151.9056843@nntp.netcomuk.co.uk>

On Tue, 07 Apr 1998 17:01:11 GMT, Jason Karney <jkarney@netgenics.com>
wrote:

>I am trying to figure out the best way to embed Perl in Java, so that a
>Java applet could interpret an arbitrary Perl script. The only info on
>this subject I have seen is for the JPL, which so far as I can tell, is
>only available as part of the Perl Resource Kit from O'Reilly.
>
>Any suggestions or comments on this issue would be greatly appreciated.

It looks like you have to pay for this.  I need to embed a scripting
language in my Java project.  I'm a student however and cannot afford
roughly 150 ukp for the privilege.  I am a great fan of O'Reilly books
and have a couple of dozen.  I am sure the Resource Kit is worth every
penny as are all the other O'Reilly books.  I would have also liked to
use Perl.

Anyway to solve this, I downloaded JPython from www.python.org and it
works really well.  You can embed Python code in Java or compile
Python to byte-code. Python scripts can import Java class libraries
and use them as standard Python class libraries.  It just does too
much to describe here, and if I tried I couldn't do it justice. 

BTW, I had never used Python but it is very easy to learn.  I brought
the O'Reilly Programming Python book, which is excellent.

If you are not tied to Perl, I would suggest checking it out.  It is
one of the most amazing things I've seen in a long time.

Cheers,

Alan. 

>Thanks.



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

Date: Wed, 15 Apr 1998 15:17:35 +0100
From: Oliver Hauser <hausi@takefive.co.at>
Subject: error with mirror.pl
Message-Id: <3534C17F.F8022B82@takefive.co.at>

hi,

i want to use mirror.pl on SunOS 5.5.1, 
but i get the following error when executing:

---cut here---
Final $ should be \$ or $name at mirror.pl line 405, within string
syntax error at mirror.pl line 405, near ", "^$2$""
Final $ should be \$ or $name at mirror.pl line 410, within string
syntax error at mirror.pl line 410, near ", "^$path$""
Execution of mirror.pl aborted due to compilation errors.
---cut here---

i have perl version 5.004_03.

please help

oliver hauser


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

Date: Wed, 15 Apr 1998 14:20:29 +0100
From: "Mike Lacey" <Mike_Lacey@Cargill.Com>
Subject: Re: Hide or Encrypt perl source code
Message-Id: <6h2c72$cvh@wind.cargill.com>

NetWare - NetWare allows you to make a program/script (batch file)
executable without allowing someone to read it. Not a real system I know -
but there you go.

Mike


Tom Christiansen wrote in message <6h0eqg$2e7$1@csnews.cs.colorado.edu>...
> .....
>You have a very strange system.   What you have advised works on no system
>I have ever seen.  If the interpreter can't read the script, you lose.





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

Date: 15 Apr 1998 12:45:56 GMT
From: matija@rzenik.arnes.si (Matija Grabnar)
Subject: How can I avoid double quotes in regex? They make a mess of emacs mode
Message-Id: <6h2a64$pkv$1@kanja.arnes.si>


Does anybody have any good tips on how to avoid having to use double 
quotes in a regex, when you have to match a string enclosed in double quotes?

The problem is that for some reason, regex matches which contain quotes
(double quotes or single), especialy in negated character classes,
drive Emacs' perl-mode batty.

Here is an example:
    ($st,$qt)=$lines=~m!submit-time="([^"]+)".*queued-time="([^"]+)"/;

If you put this in a block, perl-mode will insist on starting the next line
somewhere to the right of queued-time= string, which drives me to distraction,
because I rely on emacs' indentation to find mismatched parenthesis and blocks.

Because I don't have the knowledge to mess with perl-mode's lisp, I'm
looking for a different way to write the regex. I looked through the new Camel
and through the FAQ for alternative ways to write the quotes, but I couldn't
find anything - there aren't any backslash escapes for them, for instance...

I know this isn't a strictly Perl problem - it's a workaround for an emacs
problem, but as I said, hacking Emacs is not currently an option.
Maybe when the perl mode in Emacs is actualy written in Perl :-)

-- 
"My name is Not Important. Not to friends. 
    But you can call me mr. Important"  - Not J. Important 
Matija.Grabnar@arnes.si


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

Date: 15 Apr 1998 09:33:02 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: How can I avoid double quotes in regex? They make a mess of emacs mode
Message-Id: <af9ntash.fsf@mailhost.panix.com>

matija@rzenik.arnes.si (Matija Grabnar) writes:

> Does anybody have any good tips on how to avoid having to use double 
> quotes in a regex, when you have to match a string enclosed in double quotes?

Just backwhack the quotes.  It's ugly, but it tells CPerl-mode that
"this isn't really a quoted string."

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY


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

Date: Wed, 15 Apr 1998 11:34:24 GMT
From: vasekk@cdi.cz (Vaclav Kulakovsky)
Subject: Re: How to execute more than one command via System
Message-Id: <6h25lb$4kq$1@marvin.czech.net>

try this 

system("copy file1 file2 > file.tmp");
system("del file.tmp");

yuo don't se any output :-)



gregg@charlotte.computex.com (Greg Gershowitz) wrote:


>I am trying to use the system() function under Windows NT.  I am using
>it to call 'copy' to concatenate some files.  However, I don't want to
>see the output from 'copy'.  How can I issue the '@echo off' in the
>same system call?  Nothing I have tried (putting in \n's and such
>things) seems to work.

>Thanks.

>-Greg G

>--
>Greg Gershowitz                         mailto:gregg@charlotte.computex.com
>International CompuTex, Inc.            http://www.computex.com
>(704)547-7383 x230                      FAX: (704)548-1948

- VaK -
Vaclav KULAKOVSKY
vasekk@cdi.cz



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

Date: Wed, 15 Apr 1998 13:47:58 +0200
From: "LE CORRE" <lecorre@magic.fr>
Subject: How to insert a \n each...
Message-Id: <892641512.545718@bagdad.magic.fr>

Hi,

I don't know how to insert a \n new line each x char eg:

$line="031317212230333646490811162224293037404104050717293537414647";  (40
char)

I want to insert a \n each 10 char to display :
03131721223033364649
08111622242930374041
04050717293537414647

I tried $line=~ s/.{10}/\n/g; but it doesn't work.

Please, answer by email.
Thanks.




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

Date: Wed, 15 Apr 1998 08:06:14 -0500
From: Mark Bunkowske <mbunks@coincnx.com>
Subject: Re: Ideas for installations
Message-Id: <3534B0C5.A0D1634B@coincnx.com>



Andrew M. Langmead wrote:

> Mark Bunkowske <mbunks@coincnx.com> writes:
>
> >I thought that a CGI/Perl group (Perl IS a CGI language) would be able to at
> >least offer an additional idea or two about a CGI/Perl method of doing this.  I
> >know I didn't necessarily want any code to accomplish this.
>
> This is where your problem is.
>
> Perl is not a "CGI language"
>
> Perl is a general purpose programing language, with many features
> geared to text processing and Unix system administration, among other
> things.
>
> CGI is a protocol that can be implemented in any language that can
> read environment variables, read standard input and write the standard
> output stream.
>
> If you have a question along the lines of "how can I get a CGI script
> to do ..." the answer would be the same regardless of which language
> you use. The newsgroups <URL:news:comp.infosystems.www.authoring.cgi>
> is where people with experience in the CGI protocol (regardless of
> language) hang out.
>
> If your question was something like "how do I generate random
> passwords in perl", then that would be a perl question.
> --
> Andrew Langmead

  Ahh I see the error of my ways.  Thanks all for setting me straight.

Next time I will think before I post

Sorry to waste the bandwidth

Mark



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

Date: 15 Apr 1998 08:55:12 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: info on cookies
Message-Id: <lt7m4rkzwv.fsf@asfast.com>

abigail@fnx.com (Abigail) writes:

> Lloyd Zusman (ljz@asfast.com) wrote on MDCLXXXVIII September MCMXCIII in
> <URL: news:ltpvijlmrh.fsf@asfast.com>:
> ++ abigail@fnx.com (Abigail) writes:
> ++ 
> ++ [ ... ]
> ++
> ++ > ++ > Gilles Chong (glchy@csah.com) wrote on MDCLXXXVII September MCMXCIII in
> ++ > ++ > <URL: news:35332C56.7433130D@csah.com>:
> ++ > ++ > ++ Hi,
> ++ > ++ > ++ im playing with cookies for the moment. Generating them with a
> ++ > ++ > ++ javascript is very simple. But im stuck when it comes to getting the
> ++ > ++ > ++ cookie and reading it in Perl. It seems that there is NOT an env
> ++ > ++ > ++ variable which corresponds to the cookie.             ^^^^^^^^^^

> ++ [ ... ]
> ++
> ++ > Bottomline is, if there's no environment variable, not even the CGI
> ++ > module will help you. Take it up with your server.
> ++ 
> ++ Of course.  I never said there was no environment variable.
> 
> No, but Gilles Chong *did* say there wasn't one. And that was his
> problem. Do us a favour and read what I'm replying to before you
> reply to me, ok? 

Either Gilles Chong is saying that no env. variable is being set at
all (your interpretation, which indeed might indicate some kind of
server issue), or else Gilles Chong is unaware of the name of this
variable and is trying to learn this in order to access cookies in
Perl-based cgi scripts (my interpretation).

Plenty of useful information has now been presented regarding either
interpretation of the question, so I consider our discussion here to
be quite worthwhile.

And in case it turns out that my interpretation is accurate (or in
case any others are interested in this information), I have put
`cookie.cgi' in my FTP directory (below).  This sample script came
with the CGI package, but it might not be available to Perl users on
arbitrary systems since the contents of the `examples' directory in
the CGI.pm distribution doesn't seem to get propagated during module
installation.  This script shows more details as to how set and
retrieve cookies using the Perl CGI package.  Here's the FTP location:

   ftp://ljz.ingress.com/pub/cookie.cgi

I'll keep this file in this location for a couple weeks or so (at least
until early May).

> ++ [ ... ]

-- 
 Lloyd Zusman
 ljz@asfast.com


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

Date: Wed, 15 Apr 1998 07:50:46 -0500
From: Graham Barr <gbarr@ti.com>
Subject: Re: IO::Handle error.
Message-Id: <3534AD26.FCA1E331@ti.com>

Pranav Parekh wrote:
> 
> Hi!
> 
> I am new to this list.  I hope my question is not off topic for this list.
> My apologies if it is.
> 
> Well, I have a perl script that is giving me the following error:
> 
> Can't locate object method "autoflush" via package "IO::Handle" at
> /theperlfile.pl line 186.
> 
> I looked at line 186 and the code on that line is: SOCKET->autoflush();

I would suspect that your code does not include the statement

use IO::Handle;

which you must do first if you want to call methods on bareword handles

-- 
Graham Barr <gbarr@ti.com>
Life would be so much easier if we could just look at the source code.


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

Date: 15 Apr 1998 13:37:15 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: looking for a good win32 perl editor.
Message-Id: <6h2d6b$srq$1@ns1.arlut.utexas.edu>

James <jamesht@idt.net> writes:
> 
> I'm ready to pull my hair out.

Don't do that. 

There's a very good port of emacs for win32. It's emacs-19.34, I
think. Can't get much better than that. 

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
  "It is obvious that about 750,000 people ago, Austin was a wonderful City."


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

Date: 15 Apr 1998 11:55:12 GMT
From: klassa@aursgh.aur.alcatel.com (John Klassa)
Subject: Re: Numeric validation
Message-Id: <6h2770$ej$1@aurwww.aur.alcatel.com>

On Mon, 13 Apr 1998 23:40:53 +0200, <gurun@acc.umu.se> wrote:
->Hell, I'm pretty used to unix man pages but I really have to say that
->perl has the worst I've seen in years. Written by hackers, for hackers,
->more of the "hard to write, should be hard to read"-type..

Excuse me?  Perl's man pages are the easiest-to-read, most comprehensive
source of information I've ever seen for any programming language, ever.
Please tell me you're kidding.

-- 
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><


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

Date: 15 Apr 1998 12:14:05 GMT
From: klassa@aursgh.aur.alcatel.com (John Klassa)
Subject: Re: Numeric validation
Message-Id: <6h28ad$rp$1@aurwww.aur.alcatel.com>

On Wed, 15 Apr 1998 11:46:57 +0200, <gurun@acc.umu.se> wrote:

->Well, the part that say's "actually it's in the spec, but since you asked
->here you probably never heard of it so I'll give you an answer to you
->question and a pointer for future reference. BTW, welcome to the VRML
->community ..." :) Mostly this is because of a few very talanted people
->devoting their time and efforts to make VRML count. Bashing on newbies
->won't make that happen, and they now it.

How old is the VRML newsgroup?

This newsgroup (well, its predecessor) was like that, once.  Unfortunately,
people got too lazy attempt to figure anything out on their own, and came
looking for handouts instead.  That wears thin after a while.

-- 
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><


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

Date: Wed, 15 Apr 1998 13:05:42 GMT
From: fdc@cliwe.ping.de (Frank D. Cringle)
Subject: Re: Numeric validation
Message-Id: <vtwwcrw7yx.fsf@cliwe.ping.de>

kfox@pt0204.pto.ford.com (Ken Fox) writes:
> I'd prefer the FAQ say:
> 
>    if (/\D/)            { print "has nondigits\n" }
>    if (/^\d+$/)         { print "is a whole number\n" }
>    if (/^-?\d+$/)       { print "is an integer\n" }
>    if (/^[+-]?\d+$/)    { print "is a +/- integer\n" }
>    if (/^-?\d+\.?\d*$/) { print "is a real number\n" }

$_ = '1.2e40';
if (/^-?\d+\.?\d*$/) { print "$_ is a real number\n" }
else { print "oops, $_ is not a real number\n" }
$_ += 0;
if (/^-?\d+\.?\d*$/) { print "$_ is a real number\n" }
else { print "oops, $_ is not a real number\n" }
if (/^-?\d+(\.(\d+(e[+|-]?\d+)?)?)?$/i) { print "$_ is a real number\n" }
else { print "oops, $_ is not a real number\n" }

-> oops, 1.2e40 is not a real number
   oops, 1.2e+40 is not a real number
   1.2e+40 is a real number

-- 
Frank Cringle,      fdc@cliwe.ping.de
voice: (+49 2304) 467101; fax: 943357


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

Date: Tue, 14 Apr 1998 11:17:48 GMT
From: Dave Cross <Dave.Cross@gb.swissbank.com>
Subject: Re: Obfusticator
Message-Id: <eq0iuocejoj.fsf@gb.swissbank.com>

abigail@fnx.com (Abigail) writes:

> 
> tory1 (tory1@mail.idt.net) wrote on MDCLXXVII September MCMXCIII in
> <URL: news:3525CDB2.B45589D6@mail.idt.net>:
> ++ Hi All,
> ++ I have some perl programs I would like to distribute but
> ++ I would like the perl code to be "hidden". It strikes me
> ++ that a "random" obfusticator would shroud the code sufficiently.
> ++ 
> ++ Does anyone know of any code I could use to effectively
> ++ use for this purpose.
> 
> Just write bad code, and noone will attempt to "steal" it.

Abigail,

You seem to be assuming that anyone who 'steals' code would know
the difference between good and bad code. I'm not sure that this
assumption is warrented, I have seen many examples of bad code
propageted across the internet...

Dave...

-- 
If I wasn't so busy writing status reports,
my status report might just become a progress report.

Dave.Cross@gb.swissbank.com


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

Date: Wed, 15 Apr 1998 13:45:55 GMT
From: John Porter <jdporter@min.net>
Subject: Re: OOPS and several parents
Message-Id: <3534BB85.107@min.net>

Daniel wrote:
> 
> In the following example how do I ensure that
> both 'prime::new' and 'extra::new' are called
> from 'something::new'?  I would like to be able
> to do it in an 'oops' friendly way.
> 
> I understand that my example will not work
> because 'SUPER' only calls the first method
> it finds.  So my question is 'How do I call
> all four constructors?'
> 
> package something;
> @something::ISA = qw( second extra );

You could iterate over @ISA, calling new for each name.
But I think you'll have a little bit of a problem,
because of the diffent styles of constructor that your
base classes and derived classes have.  The two base
class constructors bless a new hash reference, while
the derived class constructors just call those; they
don't even re-bless the reference.  I guess you 
could create the two parent objects, then combine the
hash data they contain.  You should always re-bless, so 
that method lookup works as you expect.

package something;
@something::ISA = qw( second extra );
sub new { 
    my $pkg = shift; 
    my $second = new second;
    my $extra = new extra;
    my $self = bless {
       %$second,
       %$extra,
       cost => 'high',
       @_
    }, $pkg;
};


hth,
John Porter


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

Date: Wed, 15 Apr 1998 15:09:59 +0000
From: domo@tcp.ip.lu (Dominic Dunlop)
Subject: Re: Perl 5.004_64 Slower???
Message-Id: <1d7j17x.1jt3gon1tbq2niN@ppp35.vo.lu>

Tom Phoenix <rootbeer@teleport.com> wrote:

> Threading
> support has a large performance hit, even if you're not using threading.
                
s/large/slight/;

See Malcolm Beattie's recent <news:6h01bb$ej1$1@news.ox.ac.uk> in the
"Info Regarding Perl 5.005" thread.

Although Malcolm, as implementor, may be expected to be positive,
detractors of threading should satisfy themselves as to whether old
objections have been addressed before repeating them.  Fair 'nuff?

(Not that I believe threads have anything to do with this er... thread,
as even development versions of perl don't build with thread support
unless specifically directed to.  The same will be true of 5.005 when it
appears.)
-- 
Dominic Dunlop


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

Date: 15 Apr 1998 13:42:20 GMT
From: "Jeff Wilson" <jwilson@ic.ac.uk>
Subject: Re: Perl and DOS Console on Win32
Message-Id: <01bd6874$3adaba30$d53ec69b@leicester>

If. as is usual, the .pl suffix is a file type for perl.exe on your system,
create a shortcut to your .pl script. In the shortcut properties switch to
the shortcut tab and change the "Run:" window to "minimized". Then, when
the shortcut is opened, it will only appear as an entry in the taskbar as
it runs.
-- 

                                Jeff Wilson
                                London - UK

Bill Hess <brhess@email.msn.com> wrote in article
<OFqKJ0LZ9GA.202@uppubnews03>...
> I am running Perl 5.004_04 on WinNT/Win95 and I need to run a Perl
Program
> with no DOS Console window popping up - how can I do this???
> 
> 
> 


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

Date: Wed, 15 Apr 1998 08:20:17 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: problems with crypt
Message-Id: <3534B411.B227AB63@houston.Geco-Prakla.slb.com>

Steven Smith wrote:
> 
> I seem to be getting the same output from crypt for differing clear text
> input.  What's wrong here?
>   DB<14> print crypt('testing124', 'Cd')
> CdnHbyg.zu42Q
>   DB<15>  print crypt('testing126', 'Cd')
> CdnHbyg.zu42Q
<snip>

As I suspected, crypt is only significant to 8 characters.  Change
testing126 to testing226, and testing125 to testing 225, and you will
find that testing126 & (testing226/testing225) generate different info,
whereas 226/225 generate the same.

perldoc -f crypt states that crypt behaves just like crypt(3), but I
don't see anything in man -s3c crypt that tells me that the cutoff is 8
significant characters.

Undocumented feature?

Dave

-- 
"Security through obscurity is no security at all."
		-comp.lang.perl.misc newsgroup posting

----------------------------------------------------------------------
Dave Barnett                 U.S.: barnett@houston.Geco-Prakla.slb.com
DAPD Software Support Eng    U.K.: barnett@gatwick.Geco-Prakla.slb.com
----------------------------------------------------------------------


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

Date: Wed, 15 Apr 1998 13:27:06 +0200
From: Andreas Pidde <pidde@uni-koblenz.de>
Subject: Q: Pattern matching
Message-Id: <3534998A.BDD942F2@uni-koblenz.de>

Hallo,

I have a question about pattern matching. I wanted to match a sequence
of non whitespaces or whitespaces masked whith backslashes into $1.
E.g.: 'Test\ string' should give 'Test\ string'. I first tried pattern
(1) but didn't get the desired result, it only returns 'Test\' in $1,
any ideas why not 'Test\ string'? Is the sequence of the subpatterns
important for the | operator? Pattern (2) and also (3) worked fine.

Input: Test\ string

1)  print ":$1:\n" if ( /\b((\S|\\\s)+)/ );
    only prints  :Test\:  - why?

2)  print ":$1:\n" if ( /\b((\\\s|\S)+)/ );
    ok, prints  :Test\ string:

3)  print ":$1:\n" if ( /\b((\S|\\\s)+)\b/ );
    again prints  :Test\ string:


-- 
Thanks
Andreas Pidde

------------------------------------------------------------------------
EMail: pidde@uni-koblenz.de
------------------------------------------------------------------------


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

Date: Wed, 15 Apr 1998 12:08:44 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Q: Pattern matching
Message-Id: <adelton.892642124@aisa.fi.muni.cz>

Andreas Pidde <pidde@uni-koblenz.de> writes:

> Hallo,
> 
> I have a question about pattern matching. I wanted to match a sequence
> of non whitespaces or whitespaces masked whith backslashes into $1.
> E.g.: 'Test\ string' should give 'Test\ string'. I first tried pattern
> (1) but didn't get the desired result, it only returns 'Test\' in $1,
> any ideas why not 'Test\ string'? Is the sequence of the subpatterns
> important for the | operator? Pattern (2) and also (3) worked fine.

Yes, it is. The | means choice from more cases. If the first doesn't
match, second will be tried, etc. But, if the first part amtches,
there is no reason to try the second one since one of the cases
matched.

> Input: Test\ string
> 
> 1)  print ":$1:\n" if ( /\b((\S|\\\s)+)/ );
>     only prints  :Test\:  - why?

Because \S matches that backslash. So you eat up that backslash using
\S, not using \\\s. And after then you go for another iteration, and
that space doesn't match \S nor \\.

Btw., the outer pair of parens is really not needed.

> 2)  print ":$1:\n" if ( /\b((\\\s|\S)+)/ );
>     ok, prints  :Test\ string:

This is much better.

> 3)  print ":$1:\n" if ( /\b((\S|\\\s)+)\b/ );
>     again prints  :Test\ string:

Works, because after matching backspace with \S you want to have another
\S and that is not there. Then you backtrack and try \\\s and it fails
and you backtrack again and go for \\\s.

Hope this helps,

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Wed, 15 Apr 1998 14:46:57 +0200
From: Mark Fergusson <mferg@hal.ddntl.didata.co.za>
Subject: What to use for simple database ?
Message-Id: <3534AC41.F2FC2818@hal.ddntl.didata.co.za>

Hello,

I have a table of information (like a spreadsheet which must reside on
disk).
eg.

Bob,12,14,22
John,10,9,40
Bob,3,10,9
Mary,4,10,22

I need to be able to do things like:
Total=sum of 4th value
Total for Bob=sum of 4th value where name = Bob
Change 2nd value for Mary to 10
etc.

What is the best way of approaching this from perl ?

I looked at List of Hashes, and the MLDBM module, but with my limited
perl knowledge, I don't think it's going to do what I want.

Any comments will be much appreciated.

Thanks.
--
_____________________________________________
Mark Fergusson: mferg@hal.ddntl.didata.co.za
Dimension Data:
PO Box 236, Pavillion, 3611, South Africa
(+27)-204-8424 (Work)
(+27)-204-8590 (Fax)
082-771-8519 (Cell)




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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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


------------------------------
End of Perl-Users Digest V8 Issue 2327
**************************************

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