[7222] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 847 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 11 17:07:13 1997

Date: Mon, 11 Aug 97 14:00:21 -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           Mon, 11 Aug 1997     Volume: 8 Number: 847

Today's topics:
     Re: 2 variables = 1 (sorta) (Mike Stok)
     Re: 2 variables = 1 (sorta) <lilly@fedex.com>
     [Q]:Building 5.004_01 on AIX 4.2 <kissel@kissel.spicerack.ibm.com>
     Re: CGI.pm Button and Input text problems <petri.backstrom@icl.fi>
     Changing contents in a file <annek@nortel.ca>
     Re: Changing contents in a file (Jeremy D. Zawodny)
     Re: changing passwd with perl (UNIX) (Adam Rogoyski)
     Re: changing passwd with perl (UNIX) (Daniel E. Macks)
     Re: Help me!! Image cache-ing problem <burleigh@hackberry.chem.niu.edu>
     Re: How does perl work with Win32?? (COWBYS)
     Re: How to treat "\n" as "\n" ? <lilly@fedex.com>
     Re: How to treat "\n" as "\n" ? <rootbeer@teleport.com>
     Re: How to treat "\n" as "\n" ? <p.d.meiring@sheffield.ac.uk>
     Re: How to treat "\n" as "\n" ? (Thomas Bahls)
     ImageMagick, PerlMagick --- Magick.so error (Daniel Sundin)
     Re: Is there a perl IDE? ("John Dallman")
     Re: Need documentation on (TOP) formats <rootbeer@teleport.com>
     Pentium II 266 Copmuter Raffle - Dream Machine - Benefi <amercares@iag.net>
     Re: Pentium II 266 Copmuter Raffle - Dream Machine - Be (George Cobaugh)
     Re: Perl reading win95 registry <johnsone@camax.com>
     PerlScript Ready to download <garrison@delta.net>
     Re: Problem with ENV{REMOTE_USER} (Adam Rogoyski)
     Problem With Join() <perrella@ehsn9.cen.uiuc.edu>
     Re: Visual representation of UNIX Directories? (Lance D. Jacobs)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 11 Aug 1997 20:03:05 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: 2 variables = 1 (sorta)
Message-Id: <5snr5p$d8j@news-central.tiac.net>

In article <Pine.LNX.3.95.970811133930.6122B-100000@aura>,
Pat Trainor  <ptrainor@aura.title14.com> wrote:

>	The first 1/2 will not change (urlb), but the last 1/2 will. I can
>take care of the right half incrementing by 1 no sweat, the trick is how to
>create a variable whose last 4 digits are incremented with the use of
>another variable. If it were possible, I'd like to see:
>
>	$variable = "urlb0001";
>	$variable = $variable + 1;

Perl's string increment could do it for you, in the debugger:

  DB<1> $variable = "urlb0001"   

  DB<2> $variable++

  DB<3> print $variable
urlb0002

abd this'll work as long as the string's just used as a string and you use
++ on it.  Note that it gots 'urlb9999', 'urlc0000'

>	But this can't be so, right? It's a character string, as I see it.
>Kind of like adding 1 to frog. So... I can work around this by having a
>variable which I know the first part (string) and I increment the last part
>(integer). How can the 2 be concanated into a string that can be parsed
>into a variable?
>
>	Like:

>	Incrementing $count is a breeze, how do I attach it to the end of
>another variable and call a new variable that is the combination of both
>names? i.e.:
>
>	$a = "abcd";
>	$b = "1234";
>	$c = "$($a$b)"; <- this code is not right at all! But what is?

You can say 

  $a = 'abcd';
  $b = 1234;

  ${"$a$b"} = 'some other value';

as long as strict refs aren't in effect, and this would set $abcd1234

Hope this helps,

Mike


-- 
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@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Mon, 11 Aug 1997 15:05:50 -0500
From: Dave Lilly <lilly@fedex.com>
Subject: Re: 2 variables = 1 (sorta)
Message-Id: <33EF709E.167E@fedex.com>

Pat Trainor wrote:

>         $a = "abcd";
>         $b = "1234";
>         $c = "$($a$b)"; <- this code is not right at all! But what is?
> 
> where:
> 
>         I want the variable $c to be the variable $abcd1234 , not the
> numeric representation-rather constructing the name of a new variable from
> the names of 2 existing variables.
> 

Try this, Pat:

$a = "abcd";
$b = "1234";
$c = $a . $b;

'.' is the concatenation operator.  It'll put those pesky strings
together for ya.

Hope this helps!

-dave


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

Date: Mon, 11 Aug 1997 15:27:41 -0400
From: "Robert S. Kissel" <kissel@kissel.spicerack.ibm.com>
Subject: [Q]:Building 5.004_01 on AIX 4.2
Message-Id: <33EF67AD.41C6@kissel.spicerack.ibm.com>

It's a nice, fresh installation of both operating system and compiler,
and I took all the Configure defaults.

The make dies at this point:
        Making DynaLoader (static)
Writing Makefile for DynaLoader
The Unsupported function umask function is unimplemented at 
   ../../lib/ExtUtils/Install.pm line 249.
make: The error code from the last command is 2.


Stop.

Can anybody who has built this version of Perl on AIX 4.2 give me a hint
of what the trouble here is?  It sounds like the compiler libraries
aren't installed properly--or is there some patch I don't know about for
the make procedure, or some default choice I didn't notice?


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

Date: Mon, 11 Aug 1997 09:39:55 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: CGI.pm Button and Input text problems
Message-Id: <33EEB3BB.1254@icl.fi>

dcolli@casc.com wrote:
> 
> I have been a Unix perl user for the past 4 years and just started
> using CGI.pm and also scripting for W95. I have two questions
> regarding CGI.pm:
> 
> How do the variables get stored when reading input in the
> middle of a form and lastly how do I make my buttons
> perform launching of other perl scripts ?

Look up 'param' in the CGI.pm docs.

E.g.,

  $value = $query->param('name-of-input-field-on-form');

CGI.pm docs are in:

  http://www-genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.htm

regards,
 ...petri.backstrom@icl.fi
    ICL Data Oy
    Finland


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

Date: Mon, 11 Aug 1997 14:34:49 -0400
From: Anne Kumar <annek@nortel.ca>
Subject: Changing contents in a file
Message-Id: <33EF5B49.167EB0E7@nortel.ca>

Hi 

I have been trying to change the contents in a file without 
having to make a copy. I need to search through the file and 
find a string, $substring delete or replace it. Is there a way to 
do this to update the file?

Thanks

Anne


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

Date: Mon, 11 Aug 1997 20:12:28 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Changing contents in a file
Message-Id: <33ef7219.279088227@igate.hst.moc.com>

[cc'd to original author]

On Mon, 11 Aug 1997 14:34:49 -0400, Anne Kumar <annek@nortel.ca>
wrote:

>I have been trying to change the contents in a file without 
>having to make a copy. I need to search through the file and 
>find a string, $substring delete or replace it. Is there a way to 
>do this to update the file?

Look at 'perl -i' for in-place editing.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: 11 Aug 1997 19:01:51 GMT
From: ifqa242@spice.cc.utexas.edu (Adam Rogoyski)
Subject: Re: changing passwd with perl (UNIX)
Message-Id: <5snniv$laj$1@geraldo.cc.utexas.edu>

Gustav Kristoffer Ek (stoffer@netcetera.dk) wrote:
: What is the easiest way to change a password from within a perl script? I
: have looked at setpwent() but I dont know if its the right thing to do.

: I would really appreciate an example.

: Regards

   You could always open a pipe to passwd like this:
   open OUTPUT_PIPE, "|/usr/bin/passwd";
   print OUTPUT_PIPE "[oldpass]\n";
   print OUTPUT_PIPE "[newpass]\n";
   print OUTPT_PIPE "[newpass]\n";

   I don't think you can change a password without using passwd because
passwd is usually suid root.

--
           __/\__.           [-Temperance-]              .__)\__
      !    \ oO /         . :[Adam Rogoyski]: .           \ oO /    !
      .    /_\/_\       .  :[ apoc@laker.net ]:  .        /_\/_\    . 
             \/    .  :[ http://www.laker.net/apoc ]:  .    \/


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

Date: 11 Aug 1997 20:49:48 GMT
From: dmacks@sas.upenn.edu (Daniel E. Macks)
Subject: Re: changing passwd with perl (UNIX)
Message-Id: <5snttc$1m7$1@netnews.upenn.edu>

Gustav Kristoffer Ek (stoffer@netcetera.dk) wrote>
> What is the easiest way to change a password from within a perl script? I
> have looked at setpwent() but I dont know if its the right thing to do.
Adam Rogoyski (ifqa242@spice.cc.utexas.edu) said:
: 
:    You could always open a pipe to passwd like this:
:    open OUTPUT_PIPE, "|/usr/bin/passwd";
:    print OUTPUT_PIPE "[oldpass]\n";
:    print OUTPUT_PIPE "[newpass]\n";
:    print OUTPT_PIPE "[newpass]\n";

This not-necessarily-correctly assumes that /usr/bin/passwd deals
reads STDIN. You might want to check DejaNews for previous discussions
of "/bin/passwd" in this group.

dan
-- 
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks



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

Date: Mon, 11 Aug 1997 13:51:29 -0500
From: Darin Burleigh <burleigh@hackberry.chem.niu.edu>
Subject: Re: Help me!! Image cache-ing problem
Message-Id: <33EF5F31.2512@hackberry.chem.niu.edu>

Tony wrote:
> 
> I wrote a Perl CGI for a friend and it works - only once per session.
> It seems to somehow be using images from cache - it doesn't change when
> I change the form picks.  The form is at
> http://web-edge.com/checks/form.html
> and the script (partial) is below.  It should display an image based on
> a
> form selection.  I am using the GD.pm module, because I have more things
> to do with the graphics (this is just a test).  I would appreciate any
> help if someone can ....
> 
> If you go back and change the pick - it keeps the old display image but
> will do it correctly if you 'refresh'.
> 
>

Yet Another 'this is obviously a CGI question and not a Perl Question'.

I propose we add this to the FAQ:

Q: why doesn't my CGI script work?
A: Ask somebody who knows something about CGI.

==========================================================
 - darin
burleigh@hackberry.chem.niu.edu
\\//\\//.\\//\\//.\\//\\//. http://hackberry.chem.niu.edu/HOME/dcb/
 '2 kinds of green, look out!' - dieter rot


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

Date: 11 Aug 1997 18:54:33 GMT
From: cowbys@aol.com (COWBYS)
Subject: Re: How does perl work with Win32??
Message-Id: <19970811185401.OAA00283@ladder01.news.aol.com>

ALso, May I suggest, check Microsofts site, and do a search for 
"Perl IIS", one of the links you will find goes over "script mapping"
if you havent made a script map in the registry, IIS wil not know to
execute your .pl files, it will ask you to "save as" instead of executing,
I ran into the same problem, hope this helps....

davef@aasp.net


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

Date: Mon, 11 Aug 1997 13:44:59 -0500
From: Dave Lilly <lilly@fedex.com>
Subject: Re: How to treat "\n" as "\n" ?
Message-Id: <33EF5DAB.41C6@fedex.com>

Thomas Bahls wrote:
> 
> hello,
> 
>  I am looking for a function that does the opposite of quotemeta; I
> want Perl to interprete <backslash> <n> (two chars) as carriage
> return.
> 
> How can I do this?
> 
>         example:
> 
>                 $a= 'This is the first line.\n"Nope!"';
>                 print $a
> 
>         results:
>                 This is the first line.\n"Nope!"
> 
>         but I want:
>                 This is the first line.
>                 Yes!
> 

You didn't try the easiest one...you want double quotes, not singles.

$a="This is the first line.\nYes!";
print $a;

-dave


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

Date: Mon, 11 Aug 1997 12:21:16 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Thomas Bahls <thommy@cs.tu-berlin.de>
Subject: Re: How to treat "\n" as "\n" ?
Message-Id: <Pine.GSO.3.96.970811121125.22944M-100000@julie.teleport.com>

On 11 Aug 1997, Thomas Bahls wrote:

>  I am looking for a function that does the opposite of quotemeta; I
> want Perl to interprete <backslash> <n> (two chars) as carriage
> return.

(I don't see how that can be the opposite of quotemeta, but let's just go
past that.) You may want to simply use a double-quotish string in the
first place.

    $foo = "  This string contains\n  two lines.";

    $foo = qq#  You can even\n  use interesting "quotes".\n#;

But if you've read in some data (from a file or a user, for example) and
you need to convert it, this might do what you want.

    $foo =~ s!\\n!\n!g;		# Convert \n to newline

You didn't mention whether you might want '\x3f' and '\U$foo' to do
anything special, so I hope you don't. :-) 

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Mon, 11 Aug 1997 20:59:33 +0000
From: Pieter Meiring <p.d.meiring@sheffield.ac.uk>
To: Thomas Bahls <thommy@cs.tu-berlin.de>
Subject: Re: How to treat "\n" as "\n" ?
Message-Id: <33EF7D27.8C8E0B47@sheffield.ac.uk>

Thomas Bahls wrote:

> hello,
>
>  I am looking for a function that does the opposite of quotemeta; I
> want Perl to interprete <backslash> <n> (two chars) as carriage
> return.
>
> How can I do this?
>
>         example:
>
>                 $a= 'This is the first line.\n"Nope!"';
>                 print $a
>
>         results:
>                 This is the first line.\n"Nope!"
>
>         but I want:
>                 This is the first line.
>                 Yes!
>  
>
> The task sounds soooo easy, but I have not found a way to do this
> :-(
>
> anybody?
>
>  thanks in advance         ---
>                             | hommy
> --
> Thomas Bahls ? http://abwegen.cs.tu-berlin.de/~thommy/ (if NFS server
> is up ;)
> *MDR abschalten! Jetzt!*

   Try:

                $a= "This is the first line.\n\"Nope!\"";
                print $a

A string delimited by the single quote is not interpolated while a
string bounded by a double quote is... Inside a double quoted string,
you need to escape douoble quotes.... Assuming you want double quotes
printed...
Alternatively, try:

                $a= "This is the first line.\n" . '"Nope!"';
                print $a

If you do not want double quotes printed, use:

                $a= "This is the first line.\nNope!";
                print $a

Pieter

--
Pieter Meiring        email: pdm@shef.ac.uk
Medical Imaging
 




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

Date: 11 Aug 1997 20:45:49 GMT
From: thommy@cs.tu-berlin.de (Thomas Bahls)
Subject: Re: How to treat "\n" as "\n" ?
Message-Id: <5sntlt$prb$1@news.cs.tu-berlin.de>

napier@seas.upenn.edu (Bill Napier) writes:

I have asked:
>> I am looking for a function that does the opposite of quotemeta; I
>>want Perl to interprete <backslash> <n> (two chars) as carriage
>>return.

and so many people answered:
>Double quote (") do this.  The single quote (') you were using does
>not interpret \n or anything else (variable names, etc).

but...

 I am sorry that my example was so missleading. I _do_ know  the
difference between 'single' and "double" quotes (as you see ;-).

 But I have just adopted a software project, in which I cannot
(easily) change the data; in fact these are read in from many files 
which contain many different character sequences, that have normally
"special meanings" in Perl, e.g.

	\n \t
	$foo		(etc.)


 so I really have to force Perl to interpret the two chars
<backslash> and <n> as "newline", <backslash> <t> as tab and even
<dollar> "foo" as "42" (or whatever its value is).

 I have tried eval in different ways but not successful.

So my question still is:

 Is there a way bring back the "special meaning" of certain
character sequences?

anyone?

 Regards                   ---
                            | hommy

-- 
Thomas Bahls - http://abwegen.cs.tu-berlin.de/~thommy/ (if NFS server is up ;)
*MDR abschalten! Jetzt!*


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

Date: Mon, 11 Aug 1997 18:15:05 GMT
From: daniel.sundin@engelholm.se (Daniel Sundin)
Subject: ImageMagick, PerlMagick --- Magick.so error
Message-Id: <33ef5369.148632952@news.engelholm.se>

Hi,

I'm experiencing strange problems with Magick.so ... 

I've compiled ImageMagick, no problems so far. Installed it perfectly.
Then I compiled PerlMagick (perl interface to ImageMagick). 
It fails on make test though with the following message:

Can't load './blib/arch/auto/Image/Magick/Magick.so' for module
Image::Magick: File not found at
/usr/lib/perl5/i586-linux/5.00393/DynaLoader.pm line 157.

if I install it, theres no difference, I still get the same message
(which isnt too strange I guess :)

Magick.so is executable, the permissions are correct.
It contains the following libraries:
libX11.a
libMagick.a

and is using the following shared libs:
libjpeg.so.6
libmpeg.so.1
libz.so.1
libm.so.5

all of those libs/shared libs exists... 

I've doublechecked the Makefile of PerlMagick, and it seems to be
correct to me. 

ImageMagick should be correctly compiled/installed as I can use the
accompanying programs. 

I have tried to recompile both ImageMagick and PerlMagick 10-15 times.

Software i use:

Slackware 3.2
Kernel 2.0.30
Perl 5.004_01 (used to have Perl 5.003_93, didnt work then either)
GCC 2.7.2.1


I dont have a single clue as of why this error occurs. Even when doing
ldd ./Magick.so
it tells me ldd: can't execute ./Magick.so (No such file or directory)

file Magick.so gives me the following output. 
Magick.so: ELF 32-bit LSB shared object, Intel 80386, version 1, not
stripped





this is the compilation part where the libs and perlmagick are linked:
LD_RUN_PATH="/usr/X11R6/lib:/usr/local/lib:/lib" gcc -o
blib/arch/auto/Image/Magick/Magick.so  -shared -L/usr/local/lib
Magick.o    -L/usr/X11R6/lib -L/usr/local/lib -lMagick -ljpeg -lmpeg
-lz -lX11 -lm 




I'd appriciate it ALOT if anyone could help me on this one.



Daniel



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

Date: Mon, 11 Aug 1997 19:42:09 GMT
From: jgd@cix.compulink.co.uk ("John Dallman")
Subject: Re: Is there a perl IDE?
Message-Id: <EErLE9.9EM@cix.compulink.co.uk>

In article <5slbl7$68b$2@scully.new-era.net>, 
scott@lighthouse.softbase.com (Scott McMahan) wrote:

> One wonders why opportunistic software developers wouldn't
> throw a team of developers into this project. You could do it
> quick (compare how fast Microsoft created a Java IDE!), and
> it would sell like bibles on judgement day.

Read the license agreement. You can't sell perl for money.

--- 
John Dallman, jgd@cix.co.uk.


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

Date: Mon, 11 Aug 1997 12:10:28 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Glen.Culbertson@ubs.com
Subject: Re: Need documentation on (TOP) formats
Message-Id: <Pine.GSO.3.96.970811120819.22944L-100000@julie.teleport.com>

On Mon, 11 Aug 1997, Glen Culbertson wrote:

> I've found the documention on formats to be a bit on the non-intuitive
> side, a little inconsistent, and the precise meaning of the terms
> doesn't leap out to me.

I'd like to encourage you to submit documentation patches to the Perl
development team. If you're not sure how to do this, let me know by
e-mail. Thanks!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Mon, 11 Aug 1997 14:44:30 -0500
From: Frank Carr <amercares@iag.net>
Subject: Pentium II 266 Copmuter Raffle - Dream Machine - Benefits Children's Hospital
Message-Id: <33EF6B9E.29C6F6EE@iag.net>


--------------222A82801A78918C43F85FE6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

                     Pentium II 266 Computer Raffle

America Cares is holding computer raffles to benefit a children's
hospital.  We will raffle off one top of the line computer about every
six weeks until the goal is reached.  Items to be raffled off will
include top of the line computer systems, hardware, software, and
computer accessories.  For information on the hardware and software
raffles see the website at http://www.usa-nonprofit.org/no02002.htm.
Complete rules for the raffle may also be found at the website or you
may request them with your raffle ticket donation.

Grand Prize
Pentium Pro 266 Computer System:

     Maxtor 3.5 Gigabyte Hard Drive
     FDD 120 Megabyte Floppy Drive
     56K US Robotics Sportster Modem
     64 Megabytes Ram
     Mitsumi 24 Speed CD-Rom
     Sound Labs AWE-64 Gold Sound Card
     Labtec LCS-2412 Subwoofer Sound System
     Magnavox SVGA 17" Monitor
     Microsoft Natural Wave Keyboard
     Microsoft Serial Mouse
     Genius F-21 Joystick
     Microsoft Window 95 Second Version

          Retail Value $6,399.00

1st Prize
Mitsumi Internal 6x2 Recordable CD-Rom

          Retail Value $ 695.88

2nd Prize (3 Winners)
56K US Robotics Sportster Fax/Data Modem (Choice Internal or External)

          Retail Value $239.99 (ea)

------------------------------------------------------------------------
                         P-266 Raffle Entry Form
Yes, I would like to participate in America Cares' Pentium 266 Raffle.
This raffle will have a minimum of 5,000.  Donations are $5.00 per
ticket.  I accept that I will be responsible for any delivery charges
and taxes owed on any prize I may win.

Enclosed is my donation of $______ for ______ tickets at $5.00 per
ticket.  Send my raffle ticket stubs to the address I will indicate
below.

Personal Information

Name:
Address:
City:
State:                         Zip:
Phone:
E-Mail:

Mail entry form and donation to:
                              America Cares
                             341 Montego St
                            Deltona, FL 32725


America Cares maintains a website at http://www.usa-nonprofit.org
where you can find the latest items to be raffled.  Separate raffles are
being held for hardware and software items.

Florida Registration Number SC-08008
A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE
OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING
1-800-435-7352, WITHIN THE STATE.  REGISTRATION DOES NOT IMPLY
ENDORSEMENT, APPROVAL, OR RECOMMENDATION BY THE STATE.


--------------222A82801A78918C43F85FE6
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>

<CENTER><FONT SIZE=+2>Pentium II 266 Computer Raffle</FONT></CENTER>


<P>America Cares is holding computer raffles to benefit a children's hospital.&nbsp;
We will raffle off one top of the line computer about every six weeks until
the goal is reached.&nbsp; Items to be raffled off will include top of
the line computer systems, hardware, software, and computer accessories.&nbsp;
For information on the hardware and software raffles see the website at
<A HREF="http://www.usa-nonprofit.org/no02002.htm">http://www.usa-nonprofit.org/no02002.htm</A>.
<BR>Complete rules for the raffle may also be found at the website or you
may request them with your raffle ticket donation.

<P><B><FONT SIZE=+1>Grand Prize</FONT></B>
<BR><B>Pentium Pro 266 Computer System</B>:
<UL><B>Maxtor 3.5 Gigabyte Hard Drive</B>
<BR><B>FDD 120 Megabyte Floppy Drive</B>
<BR><B>56K US Robotics Sportster Modem</B>
<BR><B>64 Megabytes Ram</B>
<BR><B>Mitsumi 24 Speed CD-Rom</B>
<BR><B>Sound Labs AWE-64 Gold Sound Card</B>
<BR><B>Labtec LCS-2412 Subwoofer Sound System</B>
<BR><B>Magnavox SVGA 17" Monitor</B>
<BR><B>Microsoft Natural Wave Keyboard</B>
<BR><B>Microsoft Serial Mouse</B>
<BR><B>Genius F-21 Joystick</B>
<BR><B>Microsoft Window 95 Second Version</B>
<BR>&nbsp;
<UL><B><FONT SIZE=+1>Retail Value $6,399.00</FONT></B></UL>
</UL>
<B><FONT SIZE=+1>1st Prize</FONT></B>
<BR><B>Mitsumi Internal 6x2 Recordable CD-Rom</B>
<UL>
<UL><B><FONT SIZE=+1>Retail Value $ 695.88</FONT></B></UL>
</UL>
<B><FONT SIZE=+1>2nd Prize (3 Winners)</FONT></B>
<BR><B>56K US Robotics Sportster Fax/Data Modem</B> (Choice Internal or
External)
<UL>
<UL><B><FONT SIZE=+1>Retail Value $239.99 (ea)</FONT></B></UL>
</UL>

<HR WIDTH="100%">
<CENTER><B><FONT SIZE=+2>P-266 Raffle Entry Form</FONT></B></CENTER>
Yes, I would like to participate in America Cares' Pentium 266 Raffle.&nbsp;
This raffle will have a minimum of 5,000.&nbsp; Donations are $5.00 per
ticket.&nbsp; I accept that I will be responsible for any delivery charges
and taxes owed on any prize I may win.

<P>Enclosed is my donation of $______ for ______ tickets at $5.00 per ticket.&nbsp;
Send my raffle ticket stubs to the address I will indicate below.

<P>Personal Information

<P>Name:
<BR>Address:
<BR>City:
<BR>State:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Zip:
<BR>Phone:
<BR>E-Mail:

<P>Mail entry form and donation to:
<CENTER><B><FONT SIZE=+1>America Cares</FONT></B></CENTER>

<CENTER><B><FONT SIZE=+1>341 Montego St</FONT></B></CENTER>

<CENTER><B><FONT SIZE=+1>Deltona, FL 32725</FONT></B></CENTER>

<CENTER><B><FONT SIZE=+1>&nbsp;</FONT></B></CENTER>


<P>America Cares maintains a website at <A HREF="http://www.usa-nonprofit.org/no02000.htm">http://www.usa-nonprofit.org</A>
<BR>where you can find the latest items to be raffled.&nbsp; Separate raffles
are being held for hardware and software items.

<P>Florida Registration Number SC-08008
<BR>A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE
OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING 1-800-435-7352,
WITHIN THE STATE.&nbsp; REGISTRATION DOES NOT IMPLY ENDORSEMENT, APPROVAL,
OR RECOMMENDATION BY THE STATE.
<BR>&nbsp;</HTML>

--------------222A82801A78918C43F85FE6--



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

Date: Mon, 11 Aug 1997 20:08:06 GMT
From: gcobaugh@topspeed.com (George Cobaugh)
Subject: Re: Pentium II 266 Copmuter Raffle - Dream Machine - Benefits Children's Hospital
Message-Id: <33ef7089.18570187@news.clarion.com>

Is a CopMuter something that will silence a cop when he is standing at
your car window writing you a ticket? <g>

Sorry, couldn't resist
George Cobaugh
TopSpeed Consulting and Education
gcobaugh@topspeed.com


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

Date: Mon, 11 Aug 1997 15:09:51 -0500
From: Eric Foster-Johnson <johnsone@camax.com>
To: Leigh Satchell <leigh@deakin.edu.au>
Subject: Re: Perl reading win95 registry
Message-Id: <33EF718F.5F76@camax.com>

Leigh Satchell wrote:
> 
> Does anyone know if there is a method to read the win95 registry and
> extract info using DOS Perl or any other DOS program
> I am trying to automate the process of getting the ipaddress out of the
> registry to use in a Perl script. I can only do it manually by using
> winipcfg or regedit.
> Can anyone help?
> 
> Leigh.
> 
> leigh@deakin.edu.au
> lsatchell@geelongcity.vic.gov.au

My Web page has information on the accessing the Windows
registry from Perl, as does my book, Cross-Platform Perl:

http://www.pconline.com/~erc/perlreg.htm

Good luck,
-Eric

-- 
Eric Foster-Johnson http://www.pconline.com/~erc/
CAMAX, SDRC's CAM Business
7851 Metro Parkway         phone: +1 612 854 5300 fax: +1 612 854 6644
Minneapolis, MN 55425 USA  johnsone@camax.com


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

Date: Mon, 11 Aug 1997 12:29:21 -0700
From: "Kerry Garrison" <garrison@delta.net>
Subject: PerlScript Ready to download
Message-Id: <5snp65$646$1@news01.deltanet.com>

 PerlScript DR1 has been released!
http://www.perlscript.com

Developer Release 1 has just been put up for download. We had planned to
have the installer finished, but have instead decided to simply release the
required lib and files with a README.  We're confident you'll be able
to figure it out.... this is a developer's release after all! ;)

The DR1 binary is only available for BSDi Unix at the moment and requires
Perl 5.003. Currently, it only works with dynamic linking. We've also only
tested it with Apache... so others may wish to try it with other servers.

Other binaries for WinNT, Macintosh, Linux, MkLinux PPC, and Solaris will be
available in the near future. We are willing to talk about porting to other
environments when the final candidate is shipping.

PerlScript Development Team






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

Date: 11 Aug 1997 19:03:16 GMT
From: ifqa242@spice.cc.utexas.edu (Adam Rogoyski)
Subject: Re: Problem with ENV{REMOTE_USER}
Message-Id: <5snnlk$laj$2@geraldo.cc.utexas.edu>

Mai Yang [I] (yangma@cig.mot.com) wrote:
: I need to know the name of the person who is accessing my homepage. I
: examined the enviroment variable ENV{REMOTE_USER} and ENV{HTTP_FROM} to
: get the user's name and email. But both turned out to be null. I then 
: displayed all the enviroment variables. I found the above two variables
: were not defined at all. 

   These two variables are not always set by the browser.  And if they are
there is no way to verify them.

--
           __/\__.           [-Temperance-]              .__)\__
      !    \ oO /         . :[Adam Rogoyski]: .           \ oO /    !
      .    /_\/_\       .  :[ apoc@laker.net ]:  .        /_\/_\    . 
             \/    .  :[ http://www.laker.net/apoc ]:  .    \/


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

Date: Mon, 11 Aug 1997 15:50:11 -0500
From: perrella andrew c <perrella@ehsn9.cen.uiuc.edu>
Subject: Problem With Join()
Message-Id: <Pine.SOL.3.95.970811154429.6811A-100000@ehsn9.cen.uiuc.edu>


Hello, 

	I have a data file that has information separated by new lines

\n.  When I split the data apart into a list using the following code
everything works fine.

open(admin_info, "./admin/ip-admin.dat");
		undef $/;
		$admin_data = <admin_info>;
		$/ = '\n';  
		close(admin_info);

	@ip_data = split(/\n/, $admin_data);

	However when I modify the data and try to join it I am getting
some weird errors.

error type 1:

	local($new_info) =  join("\n", @ip_data);
	
	open (change, ">./admin/ip-admin.dat");
	print change "$new_info";
	close (change);

The Above code returns SCALAR(0x83c488) everywhere I would like to have a
new line

error type 2:

	local($new_info) =  join('\n', @ip_data);

        open (change, ">./admin/ip-admin.dat");
        print change "$new_info";
        close (change);               

literally writes the charecters "\n" into my file.

Any ideas?

Thanks, 

	Andrew Perrella




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

Date: 11 Aug 1997 18:45:18 GMT
From: ldjacobs@atm.dsccc.com (Lance D. Jacobs)
Subject: Re: Visual representation of UNIX Directories?
Message-Id: <5snmju$d4c@sun004.atm.dsccc.com>

Marjorie Roswell (roswell@umbc.edu) wrote:

[snip]

: I'm looking for a visual representation of directories in UNIX. Any
: solutions are welcome.


If a quick-and-dirty, text-based representation is OK, try this:
----------------------------------------------------------------
#! perl

if ((($ARGV[0]) && ((!(-d $ARGV[0])) && ($ARGV[0] !~ /^-?[0-9]+$/))) ||
   (($ARGV[1]) && ($ARGV[0] !~ /^-?[0-9]+$/))) {

   print(STDERR "\nUSAGE:\n\ttree [[-]depth] [path]\n\n",
      "tree draws an XTree-like representation of a directory structure,\n\t",
      "starting at the specified path or at the current directory if no\n\t",
      "path is given, and going no deeper than the specified depth.  A\n\t",
      "dash in front of depth will cause files to also be printed.\n\n");
   exit(1);
}

if (!$ARGV[0]) {

   $depth = 0;
   $fileFlag = 0;
   $startingPath = ".";

} elsif ($ARGV[0] =~ /^-?[0-9]+$/) {

   $depth = $ARGV[0];

   if ($depth  =~ /^-/) {

      $depth *= -1;
      $fileFlag = 1;

   } else {

      $fileFlag = 0;
   }

   if ($ARGV[1]) {

      $startingPath = $ARGV[1];

   } else {

      $startingPath = ".";
   }

} else {

   $depth = 0;
   $fileFlag = 0;
   $startingPath = $ARGV[0];
}

$leader[0] = "";
&RECURSE_AND_PRINT_DIRS($startingPath, "\377", 0);

exit(0);

sub RECURSE_AND_PRINT_DIRS {
   my($dir, $nextDir, $level, $i, $prevSubdir) = @_;

   if ($level > 0) {

      if ($nextDir eq "\377") {

         $leader[$level] = " `-";

      } else {

         $leader[$level] = " |-";
      }
   }

   if (($depth == 0) || ($level <= $depth)) {

      for ($i = 0; $i <= $level; $i++) {

         print($leader[$i]);
      }
   }

   if ($level > 0) {

      if ($nextDir eq "\377") {

         $leader[$level] = "   ";

      } else {

         $leader[$level] = " | ";
      }
   }

   if (($depth == 0) || ($level <= $depth) || ($level == 0)) {

      if ($level == 0) {

         print("$dir");

      } else {

         printf("%s", substr($dir, rindex($dir, "/") + 1));
      }

      if (-l $dir) {

         chomp($listing = `ls -ld $dir`);
         printf(" -> %s\n", substr($listing, rindex($listing, "->") + 3));
         return;

      } else {

         print("\n");
      }
   }

   if (-d $dir) {

      $allSubdirs = &GET_DIRS_IN_DIR($dir);

   } else {

      $allSubdirs = "\t\377";
   }

   $prevSubdir = "";

   foreach $subdir (sort(split(/\t/, $allSubdirs))) {

      if (($prevSubdir ne "") && (($depth == 0) || ($level < $depth))) {

         &RECURSE_AND_PRINT_DIRS($prevSubdir, $subdir, $level + 1);
         $prevSubdir = $subdir;

      } else {

         $prevSubdir = $subdir;
         next;
      }
   }
}

sub GET_DIRS_IN_DIR {
   my($dir, $returnString, $i) = @_;

   $returnString = "";

   if (opendir(CURRDIR, $dir)) {

      @dirEntries = readdir(CURRDIR);
      closedir(CURRDIR);

      for ($i = 0; $i <= $#dirEntries; $i++) {

         if (((-d "$dir/$dirEntries[$i]") || ($fileFlag)) &&
            ($dirEntries[$i] ne ".") && ($dirEntries[$i] ne "..")) {

            if ($returnString eq "") {

               $returnString = "$dir/$dirEntries[$i]";

            } else {

               $returnString .= "\t$dir/$dirEntries[$i]";
            }
         }
      }
   }

   return($returnString . "\t\377");
}
----------------------------------------------------------------
--
Lance Jacobs                             Email: ldjacobs@atm.dsccc.com
DSC Communications Corporation           Phone: (972) 519-5349
1000 Coit Road, Plano, Texas 75075       FAX:   (972) 519-3846
The opinions expressed above are not those of DSC Communications Corp.


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

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

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