[9381] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2976 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 25 10:17:27 1998

Date: Thu, 25 Jun 98 07:01:31 -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           Thu, 25 Jun 1998     Volume: 8 Number: 2976

Today's topics:
        Can't find shared library "libnet.so.0.92"? <mjlee@ms1.accmail.com.tw>
    Re: Colored report entries in Perl? <janne@k113.kamnet.lu.se>
    Re: first language - last language <jdporter@min.net>
    Re: first language - last language <jdporter@min.net>
    Re: first language - last language <jdporter@min.net>
    Re: first language - last language (Stuart McDow)
    Re: first language <judmc123@bellsouth.net>
    Re: first language (Frank)
    Re: Flames.... <webmaster@fccjmail.fccj.cc.fl.us>
        help! : Arrays in Perl <vosheljh@jmu.edu>
        Hiding the Perl source luong@my-dejanews.com
    Re: Hiding the Perl source (Gabor)
    Re: Hiding the Perl source <matt@pcr7.pcr.com>
    Re: Hiding the Perl source (Bob Trieger)
    Re: Hiding the Perl source <ed@lodge.ton.tut.fi>
    Re: how to read a binary file containing C structures (Mike Stok)
    Re: how to read a binary file containing C structures <webmaster@fccjmail.fccj.cc.fl.us>
    Re: LWP::Simple on NT with a proxy / fire wall <aas@sn.no>
    Re: LWP::Simple on NT with a proxy / fire wall <aas@sn.no>
        module for checking email? <kimplera@med.unc.edu>
    Re: module for checking email? <kimplera@med.unc.edu>
        OS Redirection script <mark@imp.net>
    Re: Perl debugger with GUI  ptkdb Unix/Win95/NT Compati (Andrew E Page)
        Perl OS Redirection ?? <mark@imp.net>
        Query for system resources <parctest@sgca02.cern.ch>
        Reference parameters and scripts (Marc Haber)
    Re: Reference parameters and scripts (Larry Rosler)
        regex error  <dwinfield@arrissys.com>
    Re: s/\s//g - causing strange result (Patrick Timmins)
        searching with Perl ? <Robert.Rehammar@emw.ericsson.se>
    Re: searching with Perl ? <quednauf@nortel.co.uk>
    Re: searching with Perl ? <dlaser@ermine.ox.ac.uk>
    Re: Sending files via mail in perl <jdporter@min.net>
    Re: Setting up Perl32 on Windows NT <guillaume@deepend.co.uk>
    Re: system() and security again (Lack Mr G M)
    Re: Testing perl knowledge <perlguy@inlink.com>
    Re: To be BIG or to be small ... that's my question <quednauf@nortel.co.uk>
    Re: What a Crappy World (oh, yes!) <kperrier@blkbox.com>
    Re: What a Crappy World <katzman@students.uiuc.edu>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 25 Jun 1998 18:03:11 +0800
From: "CyberSurfer" <mjlee@ms1.accmail.com.tw>
Subject: Can't find shared library "libnet.so.0.92"?
Message-Id: <6mt6sj$4tn@server2.nccu.edu.tw>

Hello everyone,

I've encountin' a problem after I finish installing perl5.00404 on my
FreeBSD 2.2.6 machine.

when i tried to use /usr/local/bin/perl5

It responsed,
ld.so failed: Can't find shared library "libnet.so.0.92"

Can Anyone who knows why it occurs and and tell me how to fix it?

Thank you very much...




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

Date: 25 Jun 1998 10:27:42 GMT
From: Janne Moren <janne@k113.kamnet.lu.se>
Subject: Re: Colored report entries in Perl?
Message-Id: <6mt8mu$in6$1@news.lth.se>

AgentNo007 <agentno007@aol.com> wrote:
: Does anyone know if Perl has a way of printing certain colors on a report
: output?  I am writing Perl on Unix, and want the output to display different
: colors on a report.  The report entries are in rows, not columns.

: Anyone know if there is a way?  I am using X-windows, and the fonts are
: customizable is that helps.  Thanks in advance.

If you are using Linux, you can check out the 'colour-ls' text in HOWTO/mini -
while specifically written for ls, it contains a BASH script and a table that
shows how to display ANSI colour sequences.

If you are on another system, the info should still be relevant; you can find
the HOWTO:s in html format through the Linux Documentation Project on
sunsite.unc.edu. Hope this helps (and please mail me with your
success/failure, I'm curious about how you did).


-- 
MvH Janne                  Mr. Janne More4n 
(jan.moren@fil.lu.se)      Kognitionsforskning
046-222 9758               Kungshuset, Lundagerd 
046-211 4973               S-222 22 Lund, Sweden


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

Date: Thu, 25 Jun 1998 12:53:01 GMT
From: John Porter <jdporter@min.net>
Subject: Re: first language - last language
Message-Id: <359249C5.227F@min.net>

F.Quednau wrote:
> 
> I could imagine that writing out binary sequences
> must be fairly tough....
> 	01100110110100011011100100101011
> There's something nice, simplistic about it, though.

In that case, you want Brainf***.
The "hello, world" program looks like this:

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

(Or so I'm told.  I can't even tell you if the linebreaks
need to be where they are.)

http://www.pangea.ca/cet/soft/lang/bf/

-- 
John Porter


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

Date: Thu, 25 Jun 1998 13:06:56 GMT
From: John Porter <jdporter@min.net>
Subject: Re: first language - last language
Message-Id: <35924D07.432A@min.net>

dgris@rand.dimensional.com wrote:
> 
> I'm not sure that I qualify as an expert, but the *last* language
> I'd want to have to write in is C++.

Surely this is an exaggeration.  
You would rather program in Basic? Pascal? Asm? Intercal?

-- 
John Porter


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

Date: Thu, 25 Jun 1998 13:11:31 GMT
From: John Porter <jdporter@min.net>
Subject: Re: first language - last language
Message-Id: <35924E1B.6028@min.net>

birgitt@my-dejanews.com wrote:
> 
>   What is the *last* language all you experts would ever want to
>   deal with ? Don't say there isn't one.

This question assumes that all the languages (!) can be assembled
into one long ordered list.  But I don't think that models the
real world accurately.  Really, you want a tree.
Perl is at the root node.
>From there we branch out through C++, Smalltalk, Scheme, Python...
When you get to the level of "worst" there are hundreds of 
languages, none of which I would prefer to another.

-- 
John Porter


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

Date: 25 Jun 1998 13:52:32 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: first language - last language
Message-Id: <6mtkn0$j4d$1@ns1.arlut.utexas.edu>

dgris@rand.dimensional.com writes:
>
> I'm not sure that I qualify as an expert, but the *last* language
> I'd want to have to write in is C++.

Agreed. What a mess. It's the COBOL of the 1990s.

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
            "Look for beauty in roughness, unpolishedness"


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

Date: Thu, 25 Jun 1998 10:06:44 GMT
From: "Judson McClendon" <judmc123@bellsouth.net>
Subject: Re: first language
Message-Id: <Uipk1.1199$w05.2052098@news1.atl.bellsouth.net>

Bart Lateur wrote:
>Judson McClendon wrote:
>
>> I can often write
>>and run a small utility in BASIC before I could fire up my VC++ or VB
>>compilers and begin coding.
>
>VB *is* BASIC. Very similar to QuickBasic, as you describe it.


Hmmm.  Since I mentioned 'my VC++ or VB compilers...', perhaps you think
I didn't know what VB is? ;-)  Actually VB is a GUI development system
which supports a dialect of BASIC for writing what amount to macros,
and which supports some OO concepts.  BASIC is a free-standing, purely
procedural language, not embodying any OO concepts.  C and C++ are
different languages, after all, are they not?  In other words, VB
*includes* a *highly modified subset* of BASIC.  VB is *not* BASIC.  And
if you think VB is 'very similar to QuickBasic', you couldn't possibly
have used both.  It is true that some of the syntax is virtually identical,
but QuickBasic and VB are far more different as a whole than say, Pascal
and ALGOL.  The user interfaces are *totally* different, and way programs
are structured is *totally* different.  If you are still unconvinced, just
write a minimal 'Hello World!' program in both, print the entire source of
each, and examine them.  Very little similarity, eh?  The text "Hello
World!" itself is the only part which is even remotely the same.  8-)
-- 
Judson McClendon          This is a faithful saying and worthy of all
Sun Valley Systems        acceptance, that Christ Jesus came into the
judmc123@bellsouth.net    world to save sinners  (1 Timothy 1:15)
(please remove numbers from email id to respond)





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

Date: 19 Jun 1998 09:51:57 +0200
From: dont_use_this_ey@hotmail.com (Frank)
Subject: Re: first language
Message-Id: <yo990mtltgi.fsf@nym.sc.philips.com>

> I have difficulties to force myself through a Pascal book and don't
> know why. (It's the book most probably, not the language, too early
> to tell). On the other hand, I miss something which is much more
> mathematical and abstract.

I did follow the old thread with your question but I hope someone
recommended the "Art of Programming" by Donald E. Knuth.

Unfortunately it is quite expensive here, so I read it only in public
libraries. It has a lot of beautiful ideas and views in it.  

> I have the feeling that all of the above I could learn by myself,
> but I miss structured teaching of designing algorithm, data structures,
> procedural and data abstraction. For those subjects, I think I would
> rather like to go to school and have been put through it.
> 
> I also find that I need something about PC Architecture. I found
> a  book I like and is helpful (PC Architecture from Assembly Language
> to C).
> 
> So, my question to the experts is, are you all gone through
> a cs/math/engineering department ? I have seen pretty strong programmers
> who are not. (hmm, of course, I can't judge how good a programmer is).
> 
> Who has really learned everything by himself without schools (and
> without ten to twenty years of exposure in the unix world on a technical
> level or without having played with programs since age nine 8-).

I think you overestimate the value of schools and universities. 

Force yourself through the Pascal book. Esspecially if it is one by
N. Wirth. After something like that (Modula-2 in my case) for me the
only way was doing "it" on my own. I cannot read computer books
without doing programming in parralel(If I try I fall asleep).

Try to get a Pascal compiler (old Turbo Pascal for Dos) if Pascal is
your language of choice. I think there are now public domain clones
for Dos/Unix availiable.) Try to develop some basic stuff on your own
(like sorting an array). Read how others do sorting. Try to understand
it. Program the basic exercises with linked lists and trees. Avoid
like plague at this stage of learning all grafical userinterface
stuff.

>From here on you should focus on your interests. Exercise algorithm
development for standard (mathematical?) problems. Or Build
Parsers. Design GUIs. Or ...

have fun 
	Frank





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

Date: Thu, 25 Jun 1998 08:32:38 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: Flames....
Message-Id: <35924366.A72F3FAB@fccjmail.fccj.cc.fl.us>

Abigail wrote:
>  
> I don't come here to have specific questions answered. But I come here
> for two reasons. To help people (but that doesn't mean I want to answers
> FAQs - I want to help beyond that) and to see what other answer on
> *interesting* questions. It's usually not that I don't know the answer,
> but answers from others often give a different viewpoint. After all,
> there are always more ways to do it.
> 
> Abigail

Something said well deserves repeating :-)

-Sneex- 
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
____________________________________________________________________________
            "Be not the first by whom the new are tried,
             nor yet the last to lay the old aside..."


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

Date: Thu, 25 Jun 1998 08:33:11 -0400
From: Justin Voshell <vosheljh@jmu.edu>
Subject: help! : Arrays in Perl
Message-Id: <35924387.A260745F@jmu.edu>

Hi all, 

	I am pretty new with Perl an can't seem to find a function that will
tell me the length of an array. Is there such a thing [there must be]?

Thanks,

Justin Voshell
Research Assistant
Department of Physics
James Madison University
_________________________

vosheljh@jmu.edu


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

Date: Thu, 25 Jun 1998 10:26:03 GMT
From: luong@my-dejanews.com
Subject: Hiding the Perl source
Message-Id: <6mt8jq$jni$1@nnrp1.dejanews.com>

Hi,
I'm finding the way to hide the source code of my
perl scripts. I have downloaded some software and
tested them on my machine. Could anybody share with
me your experience on this issue.

Here is what I have tested:
- ShroudIt! (evaluation version from www.lnk.com).
The program indeed shrows the perl code, but it also
it makes the program unable to run.

- perl2exe (evaluation version from
www.demobuilder.com). This program convert my perl
script to .exe file. But then the file size become
too big. A 11 KB perl code could grow to 0.5 MB .exe

- perl compiler version alpha 3 from www.perl.com
which convert perl to C. I have not yet finished with
this test.

I wonder if there are other software which I can try.
Thanks,
Pham Thuc Truong Luong

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 25 Jun 1998 12:03:22 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: Hiding the Perl source
Message-Id: <slrn6p4f7i.40l.gabor@localhost.vmunix.com>

In comp.lang.perl.misc, luong@my-dejanews.com <luong@my-dejanews.com> wrote :
# Hi,
# I'm finding the way to hide the source code of my
# perl scripts. I have downloaded some software and
# tested them on my machine. Could anybody share with
# me your experience on this issue.
# 
# Here is what I have tested:
# - ShroudIt! (evaluation version from www.lnk.com).
# The program indeed shrows the perl code, but it also
# it makes the program unable to run.
# 
# - perl2exe (evaluation version from
# www.demobuilder.com). This program convert my perl
# script to .exe file. But then the file size become
# too big. A 11 KB perl code could grow to 0.5 MB .exe
# 
# - perl compiler version alpha 3 from www.perl.com
# which convert perl to C. I have not yet finished with
# this test.
# 
# I wonder if there are other software which I can try.

So many people in the Perl community give freely their time and code
that asking such a question is an insult!  What makes you think your
code is so special?  I hope that questions like this will not be
tolerated in the moderated perl newsgroup coming soon.


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

Date: 25 Jun 1998 12:36:54 GMT
From: "Matt Heusser" <matt@pcr7.pcr.com>
Subject: Re: Hiding the Perl source
Message-Id: <01bda02d$b3d38c00$47eb1bcc@XSTA71.pcr.com>

>I'm finding the way to hide the source code of my
>perl scripts. I have downloaded some software and
>tested them on my machine. Could anybody share with
>me your experience on this issue....

  -- It sounds like you've done some research.  But, after
much fear the customers would run off with our source
and develop it themselves, and many conversations and
attempts to turn Perl into C and compile it, our conclusion
was the same as the FAQ:

"If you're concerned about people profiting from your code, then
the bottom line is that nothing but a restrictive license will give
you legal security.  License your software and pepper it with 
threatening statements like "This is unpublished proprietary
software of XYZ corp.  Your access to it does not give you
permission to use it blah blah blah."  We are not lawyers, of 
course, so you should see a lawyer if you want to be sure your
license's wording will stand up in court."
	- "How can I hide the source for my Perl Program?"
	- From PerFAQ(3)


 Now all you need to do is convince your manager, and you're
Golden  ...

Matt H.


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

Date: Thu, 25 Jun 1998 12:38:36 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Hiding the Perl source
Message-Id: <6mtgg0$u8f$1@strato.ultra.net>

[ posted and mailed ]

gabor@vmunix.com (Gabor) wrote:

-> So many people in the Perl community give freely their time and code
-> that asking such a question is an insult!  What makes you think your
-> code is so special?  I hope that questions like this will not be
-> tolerated in the moderated perl newsgroup coming soon.

I doubt it will be allowed. It is a FAQ and answered rather clearly in 
PerlFAQ3.

Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-286-0591
  and let the jerk that answers know that his
  toll free number was sent as spam. "


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

Date: 25 Jun 1998 16:09:54 +0300
From: Edvard Majakari <ed@lodge.ton.tut.fi>
Subject: Re: Hiding the Perl source
Message-Id: <m0af71lja5.fsf@lodge.ton.tut.fi>

>>>>> "Gabor" == Gabor  <gabor@vmunix.com> writes:

 Gabor> So many people in the Perl community give freely their time
 Gabor> and code that asking such a question is an insult!  What makes

Some people code in Perl for work. And it is sometimes necessary to
distribute these sniplets of perl code - not so many companies are
willing to share their code for free.

I'm all for GPL and free (as *free*, not just without cost) software,
but sometimes it is just necessary to distribute code without
revealing it. 

Not that it makes any difference, but IMHO so called 'core stuff'
should be always distributed under GPL. With 'core stuff' I mean all
the software needed for developing specialized software, like in Unix,
the kernel itself and basic utilities (cat, ls, command interpreter
and so on). 

-- 
//Ed               GSM: 040 5960810     URL: http://lodge.ton.tut.fi/%7Eed/
Above all continue to love one another fervently, for love throws a veil
over a multitude of faults.
 -- 1st Pet. 4:8


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

Date: 25 Jun 1998 12:40:35 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: how to read a binary file containing C structures
Message-Id: <6mtgg3$72s@news-central.tiac.net>

You can use read to read records from a file and unpack to unpack the
records into perl variables - as long as you know the layout of the
structures (including any packing)  The perfunc man page describes both
read and unpack (but the templates used for unpack are described under
pack)

Hope this helps,

Mike

In article <3591120E.11F097BA@siac.com>,
Aravind Nallan  <anallan@siac.com> wrote:
>Hi,
>
>I have a binary file produced by a C program which contains C structures
>written using fwrite. Do we have any way of reading them in perl and
>writing out into Ascii?
>
>Thanks
>Aravind
>


-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Thu, 25 Jun 1998 08:30:03 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: how to read a binary file containing C structures
Message-Id: <359242CB.D42A97EB@fccjmail.fccj.cc.fl.us>

Aravind Nallan wrote:
> 
> Hi,
> 
> I have a binary file produced by a C program which contains C structures
> written using fwrite. Do we have any way of reading them in perl and
> writing out into Ascii?
> 
> Thanks
> Aravind


Look toward bin mode while reading files in.  

OASN:
What do C Structures have to do with anything?

HTH,  :-)
-Sneex- 
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
____________________________________________________________________________
            "Be not the first by whom the new are tried,
             nor yet the last to lay the old aside..."


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

Date: 25 Jun 1998 14:26:59 +0200
From: Gisle Aas <aas@sn.no>
Subject: Re: LWP::Simple on NT with a proxy / fire wall
Message-Id: <m3yaulwtt8.fsf@furu.g.aas.no>

David Coldrick <davidc@selectst.com> writes:

> What I'd really like confirmed is that a proxy spec of 'n.n.n.n:80' should
> work.

I think you need 'http://n.n.n.n:80' (and the ':80' is redundant).

-- 
Gisle Aas


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

Date: 25 Jun 1998 14:24:55 +0200
From: Gisle Aas <aas@sn.no>
Subject: Re: LWP::Simple on NT with a proxy / fire wall
Message-Id: <m31zsdy8h4.fsf@furu.g.aas.no>

David Coldrick <davidc@selectst.com> writes:

> I don't know which version it implies either, but I did look at the code
> involved in picking up the proxy values, and it *does* lcase the name returned
> from NT before doing anything with it.

A simple trick to find out which version of a module you have
installed is to run something like:

  $ perl -MLWP\ 999
  LWP version 999 required--this is only version 5.32.
  BEGIN failed--compilation aborted.

(Don't know if the quoting above works with WinNT shells.)

-- 
Gisle Aas


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

Date: Thu, 25 Jun 1998 09:04:56 -0400
From: Randy Kimple <kimplera@med.unc.edu>
Subject: module for checking email?
Message-Id: <35924AF8.1BF2D6AE@med.unc.edu>

I am looking for a module that I can use to check if mail has arrived on
an IMAP server.  please recommend one.
Thanks,
Randy




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

Date: Thu, 25 Jun 1998 09:31:25 -0400
From: Randy Kimple <kimplera@med.unc.edu>
Subject: Re: module for checking email?
Message-Id: <3592512D.C632254@med.unc.edu>

Never mind.  I should have searched harder before posting.





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

Date: Thu, 25 Jun 1998 13:08:12 GMT
From: "GSI Net" <mark@imp.net>
Subject: OS Redirection script
Message-Id: <0Zrk1.2$SJ4.35894@eagle>

Problem: I need to redirect browsers based on their OS - to one place if it
is a 16 bit win system to another if it is a 32 bit system. The enviro
variables I have found for Win32 Perl only pull the servers variables and
not the clients. The problem is that we are using IE4 univesally in our
company but some are on win311 and some on win95/NT.
I noticed that if i use a browser redirection with the
$ENV{'HTTP_USER_AGENT'} one browser comes up as "Mozilla/4.0 (compatible;
MSIE 4.01; Windows 95)" while the Win311 comes up as "Mozilla/4.0
(compatible; MSIE 4.01; Windows 3.1; CRHC Intranet)" but I am not sure how
to write the syntax for a browser redirection based on this.
ANy help will be greatly appreciated and I may be able to recipricate as
well! Thanks in advance.

I am using the latest build of Active State's win32 Perl (isapi) on IIS4 -
(works pretty good so far).




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

Date: Thu, 25 Jun 1998 13:13:36 GMT
From: aep@world.std.com (Andrew E Page)
Subject: Re: Perl debugger with GUI  ptkdb Unix/Win95/NT Compatible
Message-Id: <Ev3zEo.Hv4@world.std.com>

ptkdb  A  Perl debugger with a perlTk Graphical User Interface
 
You can find this utility with at:
 
<a href="http://world.std.com/~aep/ptkdb">http://world.std.com/~aep/ptkdb</a>
 
http://world.std.com/~aep/ptkdb
 
   This debugger is compatible with Unix and Win95/NT.  On
the web page you'll find links to official distributions of
perlTk for Unix and Windows.

Link to perl binaries (with Tk) for Windows 95 and NT

http://www.perl.com/CPAN-local//ports/win95/Standard/x86/perl5.00402-bindist04-bc.zip 

<a href="http://www.perl.com/CPAN-local//ports/win95/Standard/x86/perl5.00402-bindist04-bc.zip">Link to perl binaries (with Tk) for Windows 95 and NT</a>

-- 
Andrew E. Page   (Warrior Poet) |   Decision and Effort The Archer and Arrow
Software Engineering Consultant |     The difference between what we are
Unix, Mac, C/C++/Java, Perl, NT |           and what we want to be.


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

Date: Thu, 25 Jun 1998 13:21:01 GMT
From: "Mark Polakow" <mark@imp.net>
Subject: Perl OS Redirection ??
Message-Id: <19sk1.1$HS4.30@eagle>

Problem: I need to redirect browsers based on their OS - to one place if it
is a 16 bit win system to another if it is a 32 bit system. The enviro
variables I have found for Win32 Perl only pull the servers variables and
not the clients. The problem is that we are using IE4 univesally in our
company but some are on win311 and some on win95/NT.
I noticed that if i use a browser redirection with the
$ENV{'HTTP_USER_AGENT'} one browser comes up as "Mozilla/4.0 (compatible;
MSIE 4.01; Windows 95)" while the Win311 comes up as "Mozilla/4.0
(compatible; MSIE 4.01; Windows 3.1; CRHC Intranet)" but I am not sure how
to write the syntax for a browser redirection based on this.
ANy help will be greatly appreciated and I may be able to recipricate as
well! Thanks in advance.

I am using the latest build of Active State's win32 Perl (isapi) on IIS4 -
(works pretty good so far).




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

Date: 25 Jun 1998 14:46:11 +0200
From: Parctest Account <parctest@sgca02.cern.ch>
Subject: Query for system resources
Message-Id: <kl6af71lkdo.fsf@sgca02.cern.ch>


Hi

Is there a way to make query the system resources, and by
that I mean the actual hardware resources such as #cpu's,
memory, swapspace and stacksize ?

I need to do this on AIX, Digital UNIX and Windows NT,
so either I need some standard way to do this, or a specific
way for each platform.

Can anybody help me with this, or maybe just point in some
direction ??

Thanks in advance
 Esben H Soerensen
 bart@sunsite.auc.dk


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

Date: Thu, 25 Jun 1998 09:57:53 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Reference parameters and scripts
Message-Id: <6mt6vt$6t4$8@nz12.rz.uni-karlsruhe.de>

Hi!

I am still busy trying to pass an already opened file handle (such as
STDIN) as a parameter to a function. This is how my test code advanced
so far:

mh@palandt:/home/mh/wd2 > cat test.pl
#!/usr/bin/perl -w

use strict;

sub mytest
{ 
  my ($FH, $Array) = @_;
  @$Array = <$FH>;
  <do something with @$array>
}

my @ThisArray; 
mytest(STDIN,\@ThisArray);
<do something else with @$array filled by mytest()>

This works fine as long as I don't "use strict;" in my code. When I
use strict, perl complains about the bareword STDIN that is illegal
with strict subs enabled. I probably need some syntactical sugar to
get that to work. What am I doing wrong?

Any hints will be appreciated.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Thu, 25 Jun 1998 04:19:29 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Reference parameters and scripts
Message-Id: <MPG.ffbd21efa911c6e9896f3@nntp.hpl.hp.com>

In article <6mt6vt$6t4$8@nz12.rz.uni-karlsruhe.de>, Marc Haber 
<Marc.Haber-usenet@gmx.de> says...
 ... 
> my @ThisArray; 
> mytest(STDIN,\@ThisArray);
> <do something else with @$array filled by mytest()>
> 
> This works fine as long as I don't "use strict;" in my code. When I
> use strict, perl complains about the bareword STDIN that is illegal
> with strict subs enabled. I probably need some syntactical sugar to
> get that to work.

Exactly.  You need to pass a reference to a typeglob:

mytest(\*STDIN, \@ThisArray);

should work fine and pass 'use strict;'.

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


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

Date: Thu, 25 Jun 1998 09:57:36 -0400
From: David D Winfield <dwinfield@arrissys.com>
Subject: regex error 
Message-Id: <35925750.10233803@arrissys.com>

Hi:

I am having a bit of a problem with this regular expression and it looks
ok to me.  Surely clearer eyes will prevail. 

 $Msg =~ /^(+\/.\;.)/; 
 where 
 $Msg = 123;MINUS pso.xxxxxxx/stuff/1221/;Another part of the string
Any sugestions?

Thanks
Dave Winfield
dwinfiel@arrissys.com


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

Date: Thu, 25 Jun 1998 09:50:07 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: s/\s//g - causing strange result
Message-Id: <6mt6gd$gtg$1@nnrp1.dejanews.com>

In article <3591B896.30D55904@nbnet.nb.ca>,
  ckilburn@nbnet.nb.ca wrote:
>
> I tried to reproduce this problem in aa small example
> but it worked fine, of course.
>
> So I printed out a little of the dubug to show the
> values being clobbered.
> My comments are marked with <<<<<<<<.
> Why this happens is a mystry to me.
>
>       if (/^\*C\*\*\s+(\S.{7})(\S.{7})\s+(\S)?\s*(\S)?/)
>       {
>          $library_dest = $1;
>          $module_name  = $2;
>          $module_type  = $3;
>          #$module_mode = $4;
>
>          $library_dest =~ s/\s//g;         # This kills $module_name and
> $1, $2, $3 ....
>          $module_name  =~ s/\s//g;
>
[snip]

Can we see some samples of your input data? From looking at your regex, it
must be in the form:

*C** a.......b....... x y
or
*C** a.......b....... xy
or
*C** a.......b....... x
or
*C** a.......b....... y

If you ever only have a line with module_mode but no module_type, which,
based on your regex, is possible, it will get thrown into the wrong variable
($module_type). Again, this would be much easier if we could see samples of
your input data.

Patrick Timmins
U. Nebraska Medical Center

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Thu, 25 Jun 1998 13:02:12 +0100
From: Robert Rehammar <Robert.Rehammar@emw.ericsson.se>
Subject: searching with Perl ?
Message-Id: <35923C43.75EB29D4@emw.ericsson.se>

Anyone whann'e tip me in about how the s/[blah...]/g searchmethod works.
I havn't found any documentation about this, so I would be verry happy
if anyone coult point me to a FAQ or somthing...

\\Robert Rehammar


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

Date: Thu, 25 Jun 1998 12:59:46 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: searching with Perl ?
Message-Id: <35923BB2.AC37875B@nortel.co.uk>

Robert Rehammar wrote:
> 
> Anyone whann'e tip me in about how the s/[blah...]/g searchmethod works.
> I havn't found any documentation about this, so I would be verry happy
> if anyone coult point me to a FAQ or somthing...
> 
> \\Robert Rehammar

perlre is your friend in this case, available as standard perl documentation:
s/1/2/g 
Replaces 1 with 2. Funny enough, the perlre page doesn't seem to explicitly
state what g does, but I think I read between the lines that it is the global
match operator.

If you are interested in regular expressions: They are based on work done by
Henry Spencer's regexp routines. And for a broader overview you could go to
http://www.exoterica.com/white/cma/ on content model algebra.

-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: 25 Jun 1998 12:56:14 +0100
From: Rob Hutchings <dlaser@ermine.ox.ac.uk>
Subject: Re: searching with Perl ?
Message-Id: <yk3emwd66g1.fsf@ermine.ox.ac.uk>

Robert Rehammar <Robert.Rehammar@emw.ericsson.se> writes:

> 
> Anyone whann'e tip me in about how the s/[blah...]/g searchmethod works.
> I havn't found any documentation about this, so I would be verry happy
> if anyone coult point me to a FAQ or somthing...
> 
> \\Robert Rehammar

You could start by reading man perlre and man perlop ...

Rob


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

Date: Thu, 25 Jun 1998 12:44:12 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Sending files via mail in perl
Message-Id: <359247B4.4F9@min.net>

Someone too cowardly to put his own name to his words wrote:
> 
> John Porter <jdporter@min.net> Said this:
> >Maybe I'm just hopelessly behind the times, but -- people who exploit
> >security holes in sendmail are called hackers (or rather, crackers),
> >not spammers.  Right?
> 
> Well, you are using the media-contrived definition of hacker.
>[blah blah blah]

No.  I know what a hacker is, thank you.  Why do you think I said
"or rather, crackers"?


> But to answer your question properly, [yadda yadda]

Guess you missed the earlier followup, which answered the question
more meaningfully.

-- 
John Porter


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

Date: Thu, 25 Jun 1998 14:23:15 +0100
From: Guillaume Buat-Menard <guillaume@deepend.co.uk>
To: bimp@bigfoot.com
Subject: Re: Setting up Perl32 on Windows NT
Message-Id: <35924F43.AD335E3A@deepend.co.uk>



eddie@eddie.com wrote:

> Can anyone please tell me the registry setting/value I need to add to
> the Windows NT registry to get Perl32 working on this platform. I can't
> seem to remember it. Any info greatly appreciated. Please email to
> bimp@bigfoot.com. Thanks
>
> BIM
> Red Dot Interactive

I had the same problem, this comes from the Microsoft site and it works:

     To configure PERL script mapping

     WARNING: Using Registry Editor incorrectly can cause serious,
system-wide problems that may require you to reinstall Windows NT to
     correct them. Microsoft cannot guarantee that any problems
resulting
from the use of Registry Editor can be solved. Use this tool at your own
     risk.

        1.Start Regedt32.exe and open
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\W3SVC\Parameters\ScriptMap

        2.Click Add Value from the Edit menu.

        3.The Value Name is .pl

        4.The Data type is REG_SZ.

        5.The String value is <the full path to perl.exe>\perl.exe %s %s

        6.Restart the WWW service.



Hope this helps,

Cheers,

Guillaume.

--
----------------------------------------------
Guillaume Buat-Menard
guillaume@deepend.co.uk
Deep End Design Ltd
40-42 Scrutton Street, London EC2A 4QL
+44 (0) 171 247 2999
http://www.deepend.co.uk
----------------------------------------------




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

Date: Thu, 25 Jun 1998 11:00:09 BST
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: system() and security again
Message-Id: <1998Jun25.110010@ukwit01>

In article <MPG.ffae671bb7baa269896bf@nntp.hpl.hp.com>, lr@hpl.hp.com (Larry Rosler) writes:
|> 
|> On the generous assumption that you have chosen this line of response 
|> because at Usenix you don't have ready access to the new documentation, I 
|> will presume to enlighten those readers who may actually be interested in 
|> the technical aspects of 'system BLOCK LIST' by sharing the documentation 
|> I was sent by Guy Decoux (thanks again, Guy; nous vous remercions 
|> beaucoup!):

   I usually work from a printed 5.002 copy of the documentation (I have
later ones online) and this includes the use of system BLOCK LIST.  All
that seems to have been added is an example - the old documentation
still mentioned that the use of this syntax forced LIST to be treated as
multi-valued (and hence no shell-escapes). 


-- 
----------- Gordon Lack ----------------- gml4410@ggr.co.uk  ------------
The contents of this message *may* reflect my personal opinion.  They are
*not* intended to reflect those of my employer, or anyone else.


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

Date: Thu, 25 Jun 1998 12:16:28 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Testing perl knowledge
Message-Id: <35923F9C.8B9E5815@inlink.com>

My goal in life was to become a "custodial ENGINEER" or a "domestic
ENGINEER", then I learned Perl and screwed all that up!  

Good thing I didn't become an "engineer" because I don't know what my
local laws are ;-)

Brent


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

Date: Thu, 25 Jun 1998 11:04:30 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: To be BIG or to be small ... that's my question
Message-Id: <359220AE.F0F3D448@nortel.co.uk>

Stephan Carydakis wrote:
> 
I guess that at heart of your program there is some regular expression. If this
is true, then you will find the perlre page most useful. In there you will also
find an option for the regular expression to look case insensitively (ouch,
freestyle English again!).

  /SoMeThInG/i will also match sOmEtHiNg.


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: 25 Jun 1998 08:35:52 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: What a Crappy World (oh, yes!)
Message-Id: <ysizpf1mwnb.fsf@blkbox.com>

abigail@fnx.com (Abigail) writes:

> 
> Isn't it time for a RFD about comp.lang.perl.tom.christiansen?
> 

Shouldn't that be comp.lang.perl.tom-christiansen?  Of course, if also
want comp.lang.perl.tom.phoenix, comp.lang.perl.tom.jones, etc then
the "." is fine :)

> 
> Abigail
> -- 
> Oops. Did I just suggest looking something up in the manual?

OBwhine:  But Abigail, my Netscape Comminucator news reader doesn't
support killfiles!  What am I to do?

Kent


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

Date: Thu, 25 Jun 1998 08:37:48 -0500
From: Olga <katzman@students.uiuc.edu>
Subject: Re: What a Crappy World
Message-Id: <Pine.SOL.3.96.980625083613.20991B-100000@ux9.cso.uiuc.edu>

I am not saying that referring a new user to the FAQ is insulting.  I am
referring to other comments made by people on this group, either in
private or as a public post, such as, "That question is so stupid I can't
even begin clarifying it for you, so i am not going to".
That type of a response helps no one, and really just wastes the time the
person given and recieving the help.
Olga

On Wed, 24 Jun 1998, Patrick Timmins wrote:

> In article <Pine.SOL.3.96.980624093825.25068A-100000@ux5.cso.uiuc.edu>,
>   Olga <katzman@students.uiuc.edu> wrote:
> 
> > people who are trying to learn.  You know, it would be so nice if upon
> > reading a "stupid" question, Mr. Christiansen said, "Hmm, what a stupid
> > question, and I  feel instulted that people even ask these types of
> > questions, but I am not going to insult this person.  Nope, I'll just keep
> > my mouth shut and let someone else answer this one."  That would be so
> > nice.
> > So I guess what I am trying to say is, wouldn't it be nice if when people
> > had nothing good to say and they couldn't help someone, they just wouldn't
> > say anything?  I think so.
> 
> Why not do both? Help them and give them a prod. Which is what virtually every
> FAQ I've ever seen on this list has received. You may not like the help, just
> like you may not like wound debridement or vaccination shots, but it is, in
> fact, still help (and the appropriate help at that).
> 
> Don't be such a big baby! :)
> 
> Patrick Timmins
> U. Nebraska Medical Center
> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/   Now offering spam-free web-based newsreading
> 
> 



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

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

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