[10157] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3750 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 18 11:07:29 1998

Date: Fri, 18 Sep 98 08:00:19 -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           Fri, 18 Sep 1998     Volume: 8 Number: 3750

Today's topics:
    Re: and? or? (logical operator question) (John Klassa)
    Re: assigning file contents to a string (Mark-Jason Dominus)
    Re: assigning file contents to a string (Larry Rosler)
    Re: assigning file contents to a string (Steve Linberg)
    Re: Formmail for windows (Steve Linberg)
    Re: how safe is xor encryption ? (Mark-Jason Dominus)
    Re: Javascript or Perl or Java? dave@mag-sol.com
        Limits on command line length in Win32 perl5? <smithr@lexma.meitech.com>
        Module XBase and Perl <c_blaha@hamm.netsurf.de>
    Re: Module XBase and Perl (Honza Pazdziora)
    Re: newbie - ms access database on unix (Steve Linberg)
    Re: Newbie needs CGI help (Steve Linberg)
    Re: Newbie needs CGI help dave@mag-sol.com
    Re: passing argument !!!! dave@mag-sol.com
    Re: Perl & Java - differences and uses <garry@sage.att.com>
    Re: Perl & Java - differences and uses <garry@sage.att.com>
    Re: Perl & Java - differences and uses <zenin@bawdycaste.org>
    Re: Perl & Java - differences and uses <garry@sage.att.com>
    Re: Perl implementation question <rick.delaney@shaw.wave.ca>
        Perl WinNT Hardware IO <linus.schaber@siemens.at>
        Running a perl script setuid (CGI) menger@my-dejanews.com
        setuid perl + CGI menger@kgv.edu.hk
        User inputted regexp. <mkbowler@nortel.com>
        Win32::NetResource `can't load...., line 168, DynaLoade hradil@intoaction.com
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 18 Sep 1998 14:38:51 GMT
From: klassa@aur.alcatel.com (John Klassa)
Subject: Re: and? or? (logical operator question)
Message-Id: <6ttr9r$p1b$1@aurwww.aur.alcatel.com>

On Wed, 16 Sep 1998 15:01:56 -0500, Mary E Tyler wrote:
  > maybe what i really want to know is: will this work?

Not to be overly critical, really, but let me ask you this:

	Have you tried this to see if it works?

Seems like that'd be the easiest way to find out, no?

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


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

Date: 18 Sep 1998 10:32:33 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: assigning file contents to a string
Message-Id: <6ttqu1$jni$1@monet.op.net>

In article <linberg-1809980943050001@ltl1.literacy.upenn.edu>,
Steve Linberg <linberg@literacy.upenn.edu> wrote:
>In article <x3yr9xbhi59.fsf@tigre.matrox.com>, Ala Qumsieh
><aqumsieh@tigre.matrox.com> wrote:
>> { undef $/; $string = <FILE> }
>
>That said, your solution above is indeed faster and better; I had never
>seen it before.  I don't know if there are any consequences to be had of
>undef'ing $/, and since I'm unsure about how many of the system variables
>are used, I'm usually hesitant about messing with them - or if I do, I set
>them right back after I'm done with them.  I'm assuming changing $/ would
>mess up any code below yours that wasn't expecting it... although I
>suppose this could be an argument for explicitly setting it before
>accessing files, just in case someone above you has changed it.

Ali made a mistake.  He meant to say

	{ local $/ = undef; $string = <FILE> }

The `local' confines the change to the block.  After the program reads
the file, the old value of $/ is restored automatically.



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

Date: Fri, 18 Sep 1998 07:40:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: assigning file contents to a string
Message-Id: <MPG.106c10c6a347d4da989868@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <linberg-1809980943050001@ltl1.literacy.upenn.edu> on Fri, 18 
Sep 1998 09:43:05 -0500, Steve Linberg <linberg@literacy.upenn.edu> 
says...
> In article <x3yr9xbhi59.fsf@tigre.matrox.com>, Ala Qumsieh
> <aqumsieh@tigre.matrox.com> wrote:
 ...
> > { undef $/; $string = <FILE> }
> 
> That said, your solution above is indeed faster and better; I had never
> seen it before.  I don't know if there are any consequences to be had of
> undef'ing $/, and since I'm unsure about how many of the system variables
> are used, I'm usually hesitant about messing with them - or if I do, I set
> them right back after I'm done with them.  I'm assuming changing $/ would
> mess up any code below yours that wasn't expecting it... although I
> suppose this could be an argument for explicitly setting it before
> accessing files, just in case someone above you has changed it.

It *would* mess up any code below, which is why the snippet shown above 
is *not* the recommended Way To Do It (even though it is shown that way 
in 'perlvar'! -- without the enclosing block, though).  This approach:

    { local $/; $string = <FILE> }

or, as I am seeing more of lately,

    $string = do { local $/; <FILE> };

has the effect of encapsulating the change of $/ in the block 
('local'izing the change, as it were).

> However, if I had studied perlvar more closely, I would have found your
> code below.

Yes, you would.  Too bad.

>    Very cool.  Another neat side effect of changing $/ is that
> if you set it to an integer value, it limits the record length.  So you
> could set it to 80 to get the first 80 characters of every line in a file,
> for instance.

Set it to a *reference* to an integer value.  Setting it to 80 defines 
the input record separator as the string '80'.

 ... 

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


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

Date: Fri, 18 Sep 1998 10:49:45 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: assigning file contents to a string
Message-Id: <linberg-1809981049450001@ltl1.literacy.upenn.edu>

In article <MPG.106c10c6a347d4da989868@nntp.hpl.hp.com>, lr@hpl.hp.com
(Larry Rosler) wrote:

> [Posted to comp.lang.perl.misc and copy mailed.]
> 
> In article <linberg-1809980943050001@ltl1.literacy.upenn.edu> on Fri, 18 
> Sep 1998 09:43:05 -0500, Steve Linberg <linberg@literacy.upenn.edu> 
> says...
> >    Very cool.  Another neat side effect of changing $/ is that
> > if you set it to an integer value, it limits the record length.  So you
> > could set it to 80 to get the first 80 characters of every line in a file,
> > for instance.
> 
> Set it to a *reference* to an integer value.  Setting it to 80 defines 
> the input record separator as the string '80'.

Oops, my bad.  Yeesh.  Sheepisly checking out of this thread to go study
perlvar before I spread any more misinformation.  Sorry everyone.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Fri, 18 Sep 1998 10:22:36 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Formmail for windows
Message-Id: <linberg-1809981022360001@ltl1.literacy.upenn.edu>

In article <6trt55$qmm$1@nnrp1.dejanews.com>, stan_tall_man@hotmail.com wrote:

> does anyone know where (if one exists) I can find a version of formmail for
> windows?  Is there some way to get formmail.pl to work with windows web
> servers? thanks, stan

You can try form2mail, at <http://www.liquidsilver.com/scripts/>.  I had
to hack it a little to make it do what I wanted, but it's usable.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: 18 Sep 1998 10:13:22 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: how safe is xor encryption ?
Message-Id: <6ttpq2$jbt$1@monet.op.net>

In article <3601F346.3D77@DejahsPrivateIce.com>,
Mary E Tyler  <dejah@DejahsPrivateIce.com> wrote:
>> > and how do you have  15% of a bit...
>> 
>> In exactly the same way that the average family has 2.6 children.
>
>i'll ask Matthew's pardon, for feeling so dumb... 
>
>HUH!!!???

Well, let's try it a little differently.  A bit it the amount of
information on one binary digit.  Let's try to figure out how much
information is in one decimal digit.  If I have a decimal digit, and I
want to tell you what it is, how many binary digits do I need to do
that?  

I can make a table like this:

	Digit		Binary code
	0		0000
	1		0001
	2		0010
	3		0011
	4		0100
	5		0101
	6		0110
	7		0111
	8		1000
	9		1001

If I need to send a decimal digit, I can find the corresponding set of
binary digits from the table and send you that instead.  You have a
copy of the table, and when you receive the for binary digits, you
look in the table, and then you know what decimal digit I am talking
about.

If we agree on the codes in advance, I can send you four binary
digits, and that is enough to tell you what decimal digit I am
thinking of.  In fact, it's more than enough, because there are six
codes I didn't use at all.  On the other hand, three binary digits is
not enough, because there are only 8 ways to put together three binary
digits, and I need at least 10 ways, one for each decimal digit.

So a decimal digit contains more than 3 bits of information, but less
than 4.

Now suppose we want to send three-digit decimal numbers.  Obviously we
could use the table above and use 12 binary digits for each one.  But
if we change the code table we can do better, only 10 binary digits
instead of 12:

	Digit group	Binary code
	000		0000000000
	001		0000000001
	002		0000000010
	...		...
	729		1011011001
	...		...
	999		1111100111

Ten binary digits is enough.  There are 1,024 ways to string together
ten binary digits.  But nine binary digits is not enough, because
there are only 512 ways to string together nine binary digits, and we
need at least 1,000.

So

	3 decimal digits contain more information than  9 binary digits
	3 decimal digits contain less information than 10 binary digits

A decimal digit contains between 3 and 3.33 bits.  3.33 is much closer
to the truth, because 3 decimal digits (1000 combinations) are
*almost* enough to encode any combination of 10 binary digits (1024
combinations), whereas 9 binary digits (512 combinations) are only
enough to encode half the possible combinations of 3 decimal digits
(1000 combinations).

The actual answer turns out to be that one decimal digit contains
about 3.3219 bits of information.  Over the long haul, in long
messages, you can replace a decimal digit with about 3.3219 binary
digits.  In short messages of only a few digits, you won't be able to
do so well.  If you're only sending one decimal digit, you can't send
3.3219 bits, because, as you pointed out, there is no such thing as a
fractional bit.  You have to round up and send 4 binary digits instead
of 3.3219.  If you're only sending three decimal digits, you have to
round up and send 10 binary digits instead of 9.9657.  But if you're
sending 10,000 decimal digits, it is a very simple matter to encode
them with 33,220 binary digits.

That is how you can have a fractional number of bits.



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

Date: Fri, 18 Sep 1998 14:41:56 GMT
From: dave@mag-sol.com
Subject: Re: Javascript or Perl or Java?
Message-Id: <6ttrfl$q35$1@nnrp1.dejanews.com>

In article <36024e86.64303148@alder>,
  fty@utk.edu (Jay Flaherty) wrote:

> Perl - Excellent tools to handle CGI (CGI.pm), Database access
> (DBI.pm), excellent text parsing. Some what easy to learn. Currently
> lacks interaction with the DOM. When are we going to have a Perlscript
> (i.e. client side programming)?   :-)

I think you can already get PerlScript from ActiveState
<http://www.activestate.com>. I haven't tried it.

Dave...

--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Fri, 18 Sep 1998 10:14:18 -0400
From: "Ray Smith" <smithr@lexma.meitech.com>
Subject: Limits on command line length in Win32 perl5?
Message-Id: <6ttpqb$bu2$1@client3.news.psi.net>

I just got supprised by an apparent command line length limit in Perl5 on
Win32.  It appears to be approximately 32K.  It occurred when I was trying
to analyize a number of files which had fairly long path names.  I note that
the version of Perl which comes with Mortice Kern Systems (MKS) has no such
limit.  Any ideas on whether this will be fixed?  Could this be a limitation
in the interface between non-MKS programs and the MKS Korn shell ? The
following is a small demonstration.

My environment: Gateway G6-200 (Pentium), Windows NT4.0, MKS 6.1 Toolkit
Korn shell

Executing distributed Perl5:
S:/FSMS[3435] d:/crs/perl/p544/perl5.004_04/perl -e 'for (@ARGV){print
"$_\n";}' $(cat find.txt)|wc
    354     354   33046

Checking Argument string length:
S:/FSMS[3436] wc find.txt
    424     424   39621    find.txt

Executing same script with MKS version of Perl
S:/FSMS[3437] c:/mks/mksnt/old/perl -e 'for (@ARGV){print "$_\n";}' $(cat
find.txt)|wc
    424     424   39621




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

Date: Fri, 18 Sep 1998 15:59:28 +0200
From: Christian Blaha <c_blaha@hamm.netsurf.de>
Subject: Module XBase and Perl
Message-Id: <36026740.9E2709A@hamm.netsurf.de>

Hi !

Is there anybody who has used the XBase-Module with Perl and can send me
some example scripts?


Thanks !



Christian Blaha
c_blaha@hamm.netsurf.de



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

Date: Fri, 18 Sep 1998 14:51:12 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Module XBase and Perl
Message-Id: <EzHILC.MCs@news.muni.cz>

On Fri, 18 Sep 1998 15:59:28 +0200, Christian Blaha <c_blaha@hamm.netsurf.de> wrote:
> 
> Is there anybody who has used the XBase-Module with Perl and can send me
> some example scripts?

The distribution itself contains both man pages with examples, and
examples in the eg directory.

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


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

Date: Fri, 18 Sep 1998 09:50:30 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: newbie - ms access database on unix
Message-Id: <linberg-1809980950300001@ltl1.literacy.upenn.edu>

In article <6ts5p1$b13$1@av2.rz.fh-augsburg.de>, "Aurel"
<int@rz.fh-augsburg.de> wrote:

> How can i access an ms-access database with perl
> that is running on solaris-unix machine.
> Im already a bit familiar with perl but without a clue
> in that case.
> 
> thanks for any help
> 
> Norbert

Use deja news to search for this; there has been extensive discussion of
it here in recent weeks.  The short answer, as I understand it (perhaps
imperfectly) is: it's possible, but difficult, and may require the
purchase of commercial software.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Fri, 18 Sep 1998 09:46:47 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Newbie needs CGI help
Message-Id: <linberg-1809980946470001@ltl1.literacy.upenn.edu>

In article <6ttl91$jpd$1@nnrp1.dejanews.com>, c960901@student.dtu.dk wrote:

> Hi
> 
> I'm trying to make a CGI that when executes just writes a file and
> returns a string to the applet that called it. The source looks like
> this:
> #!/usr/local/bin/perl -w
> 
> $write_file = "c:\\httpd\\HtDocs\\test.mpr";
> open(OUT,">>$write_file") || die "Error: $write_file $1";
> print OUT "Test 1 2 3...\n";
> close(OUT);
> 
> Content-type: text/html

Perl chokes on your script because you're trying to execute the line
"Content-type: text/html".

If you want to print that information, then do that.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Fri, 18 Sep 1998 13:43:27 GMT
From: dave@mag-sol.com
To: c960901@student.dtu.dk
Subject: Re: Newbie needs CGI help
Message-Id: <6tto1v$mgr$1@nnrp1.dejanews.com>

[email copy of Usenet article sent to cited author]

In article <6ttl91$jpd$1@nnrp1.dejanews.com>,
  c960901@student.dtu.dk wrote:
> Hi
>
> I'm trying to make a CGI that when executes just writes a file and
> returns a string to the applet that called it. The source looks like
> this:
> #!/usr/local/bin/perl -w
>
> $write_file = "c:\\httpd\\HtDocs\\test.mpr";
> open(OUT,">>$write_file") || die "Error: $write_file $1";
> print OUT "Test 1 2 3...\n";
> close(OUT);
>

Pretty basic error here. 'Content-type: text/html' means nothing to Perl.
Try:

print "Content-type: text/html\n\n";

> Content-type: text/html
>
> print("Abcdefghijkl");
> exit 0;
>
> But I get the following compile errors (because of the Content-type):

[errors snipped]

> I'll be grateful of any help. Please send the reply to my E-mail adress,
> thanks in advance.

I've copied the reply to your email address, but I think asking for email
replies is pretty antisocial. If you want help, you should be prepared to work
for it.

Dave...

--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Fri, 18 Sep 1998 14:44:53 GMT
From: dave@mag-sol.com
Subject: Re: passing argument !!!!
Message-Id: <6ttrl5$qbq$1@nnrp1.dejanews.com>

In article <360253EC.9175A8E2@america.net>,
  Garry Williams <garry@america.net> wrote:
> Does
>
>     system("browser_crno.ksh '$DATE' > $DOCS_DIR/$out_put");
>
> help?

I think you'll need

    system("browser_crno.ksh \'$DATE\' > $DOCS_DIR/$out_put");

otherwise the variable $DATE won't get interpolated. Might be even better
to use the generic quoting operators.

    system(qq[browser_crno.ksh "$DATE" > $DOCS_DIR/$out_put]);

hth,

Dave...

--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Fri, 18 Sep 1998 09:55:20 -0400
From: "Garrett G. Hodgson" <garry@sage.att.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36026648.D567E8D5@sage.att.com>

Zenin wrote:
> 
> Mike Meyer <bouncenews@contessa.phone.net> wrote:
> : In <906047183.589733@thrush.omix.com>, Zenin <zenin@bawdycaste.org> wrote:
> : About as valid as flaming about Perl using special characters to
> : determina a variables type. The only other language I know of that
> : uses that silly trick is BASIC.
> 
>         Which BASIC?  The ones I've used haven't done this.

ahhh, the Good Old Days.  when men were men and variable names were
1 letter long.  except for string variables, which were 1 letter
followed by a "$".  sigh.  life was good.

> -Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
> BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
> Berkeley or thereabouts.  Similar in many ways to the prescription-only
> medication called "System V", but infinitely more useful. (Or, at least,
> more fun.)  The full chemical name is "Berkeley Standard Distribution".

your .sig reminded me of an old quote, saved from someone else's long
ago:

There are two major products that come out of Berkeley: LSD and UNIX. 
We don't
believe this to be a coincidence.    -  Jeremy S. Anderson


-- 
Garry Hodgson			and when they offer
garry@sage.att.com		golden apples
Software Innovation Services	are you sure you'll refuse?
AT&T Labs			heaven help the fool.


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

Date: Fri, 18 Sep 1998 09:57:23 -0400
From: "Garrett G. Hodgson" <garry@sage.att.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <360266C3.4657B9F6@sage.att.com>

Zenin wrote:
> 
> Terry Reedy <tjreedy@udel.edu> wrote:
> : Actually, Python allows optional use of '#{' and '#}' as block delimiters
> : (but only at the ends of lines, in addition to normal indentation).  One
> : could add these where desired for the purpose described above.
> 
>         Does this actually have any effect on Python's blocking, or is it
>         just the editor kluge it looks like?

kluge.

>         Funny, #{ and #} look a lot like line noise to me. ;-P

indeed.  as if "{" wasn't ugly enough.

-- 
Garry Hodgson			and when they offer
garry@sage.att.com		golden apples
Software Innovation Services	are you sure you'll refuse?
AT&T Labs			heaven help the fool.


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

Date: 18 Sep 98 14:40:35 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <906129881.881802@thrush.omix.com>

John Porter <jdporter@min.net> wrote:
: Felix S. Gallo wrote:
: > Here we discover the crux of the problem: George Reese
: > believes that hilariously nonsensical dogma, stated in an
: > authoritative way, is a feasible substitute for a forebrain.
	>snip<
: Brilliant, Felix, absolutely right on; My Man!

	Ya know, you're right, he is.   I'm saving Felix's writings for
	my .sig collection. :-)

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Fri, 18 Sep 1998 10:44:40 -0400
From: "Garrett G. Hodgson" <garry@sage.att.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <360271D8.A8636A16@sage.att.com>

Zenin wrote:
>         A language can be hard to work with for many reasons.  Lack of
>         support from the common editors can most defiantly be one of them.
> 
>         Imagine coding <insert nearly any language> without auto-indent for
>         instance.

i do this daily.  i never found any value in auto-indent, so i
never put it into my editor.  i've used editors that do this,
and found it got in my way more than it helped.

<lightbulb> aaahhh, i think it get it now.  is this angst over
whitespace due to some editors auto-indenting inconsistently?
i guess that's why i've never seen this as a problem.

> Garrett G. Hodgson <garry@sage.att.com> wrote:
>         >snip<
> : besides, from a freedom standpoint, the requirement that i inform
> : the interpreter of the type of each variable reference seems far more
> : intrusive.  i guess we all choose our own shackles.
> 
>         $foo and @foo are two different variables.  Therefore, simply
>         think of it as:
> 
>                 function (\VARNAME);
> 
>         Since $ and @ are part of VARNAME, you aren't really informing
>         perl of the type just of the reference.
kind of a stretch, isn't this?  besides, this still involves
perl enforcing naming conventions on variables (like the old BASICs
mentioned in another post).  hardly Truth, Justice, and the American
Way.

-- 
Garry Hodgson			and when they offer
garry@sage.att.com		golden apples
Software Innovation Services	are you sure you'll refuse?
AT&T Labs			heaven help the fool.


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

Date: Fri, 18 Sep 1998 12:25:20 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Perl implementation question
Message-Id: <360252BA.81DC65A9@shaw.wave.ca>

[posted & mailed]

Sven Hessler wrote:
> 
> empower.eng wrote:
> 
> > What I like to be able to do is (not correct Perl syntax).
> > $Header = ($H1, $H2);
> > $Data = ($D1, $D2, $D3);
> > Then
> > ($Header, $Data) = split(/:/);
> > And better yet able to use $Header and $Data to print.
> 
> Maybe this code snippet will help you:
> 
> ($Header[0], $Header[1], $Data[0], $Data[1], $Data[2]) = split(/:/);
> 

Or this:
    (@Header[0, 1], @Data[0..2]) = split /:/;

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: Fri, 18 Sep 1998 16:02:44 +0200
From: Linus Schaber <linus.schaber@siemens.at>
Subject: Perl WinNT Hardware IO
Message-Id: <36026804.97600FD4@siemens.at>

I am using Perl for WinNT. Is it possible to use the parallel printer
port for simple switching tasks (light on/off) out of a perl program?
Is there any way to access the hardware out of PERL win32?

Linus




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

Date: Fri, 18 Sep 1998 13:55:53 GMT
From: menger@my-dejanews.com
Subject: Running a perl script setuid (CGI)
Message-Id: <6ttop9$nb9$1@nnrp1.dejanews.com>

Hello,
I am trying to run a perl script which will setuid to a user called mailman.
This script will eventualy be a web interface to the virtual mail system i am
running on top of qmail. Anyway, I need some help on the following

1) How to run a script setuid and change the user. (All I know is chmod u+s
script)
2) How to run the script under apache 1.3.1.

Any help on the above would be greatly appricated.

from,
Matthew Enger
System Administrator KGV School.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Fri, 18 Sep 1998 14:05:57 GMT
From: menger@kgv.edu.hk
Subject: setuid perl + CGI
Message-Id: <6ttpc5$nv7$1@nnrp1.dejanews.com>

Hello,
I am trying to run a perl script which will setuid to a user called mailman.
This script will eventualy be a web interface to the virtual mail system i am
running on top of qmail. Anyway, I need some help on the following

1) How to run a script setuid and change the user. (All I know is chmod u+s
script)
2) How to run the script under apache 1.3.1.

Any help on the above would be greatly appricated.

from,
Matthew Enger
System Administrator KGV School.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Fri, 18 Sep 1998 10:25:55 -0400
From: Michael Bowler <mkbowler@nortel.com>
Subject: User inputted regexp.
Message-Id: <36026D73.4F19B19E@nortel.com>

How can I verify a regular expression given by the user for validity?

Code snippet.
$exp = <STDIN>;
chop $exp;
if ($data =~ /$exp/) {
   #Do something.
}

This works great until the user types something beginning with a single asterisk
or something else invalid.  Is there a way for me to validate $exp (or at least
gracefully catch the error)?

Thanks,
-- 
   Michael Bowler                     Phone:    613-765-3432
   IC Design Tools - 5T11             ESN:          39+53432
   Nortel Semiconductors              Email: mkbowler@nt.com


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

Date: Fri, 18 Sep 1998 14:39:38 GMT
From: hradil@intoaction.com
Subject: Win32::NetResource `can't load...., line 168, DynaLoader.pm`
Message-Id: <6ttrba$pv6$1@nnrp1.dejanews.com>

Any ideas as to why i can't seem to get the Netresource module working ??
using ActiveState ActivePerl ??? most modules using DynaLoader fail ??
Solutions ???


christopher j hradil
hradilc@toysrus.com

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

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


Administrivia:

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

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


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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


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

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