[12911] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 321 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 31 11:07:19 1999

Date: Sat, 31 Jul 1999 08:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 31 Jul 1999     Volume: 9 Number: 321

Today's topics:
        ActivePerl Build 815 Setup Problem (NEED HELP) <pgalipo@cam.org>
    Re: ActivePerl Build 815 Setup Problem (NEED HELP) <pgalipo@cam.org>
        Announcement: "CRAP" <jeffp@crusoe.net>
    Re: Beginner-friendly group as cultural adaptation? <tchrist@mox.perl.com>
    Re: Beginner-friendly group as cultural adaptation? <andrewf@beausys.demon.co.uk>
        Capturing the next line <cath@myspace.force9.co.uk>
    Re: Capturing the next line <wingcma@mailexcite.com>
    Re: Cookies and CGI::Cookie <igor@attractive.com>
    Re: How to read the submit button as a name or value <tchrist@mox.perl.com>
    Re: How to read the submit button as a name or value (Bart Lateur)
    Re: How to read the submit button as a name or value <igor@attractive.com>
        Modifying file permissions from a pl script arpith@hotmail.com
    Re: Modifying file permissions from a pl script <swiftkid@bigfoot.com>
    Re: Modifying file permissions from a pl script <jeffp@crusoe.net>
    Re: Newbie Q: How to check if invoked as CGI program <andrewf@beausys.demon.co.uk>
        Perl bug? <wingcma@mailexcite.com>
    Re: Perl bug? (Larry Rosler)
        pipes vs csv <joeyandsherry@mindspring.com>
    Re: pipes vs csv <swiftkid@bigfoot.com>
        Problem with installation of Win32GUI, please help <softwareconnection@compuserve.com>
        Problem with installation of Win32GUI, please help <softwareconnection@compuserve.com>
        Problem with installing Win32GUI-Beta, please help <softwareconnection@compuserve.com>
    Re: Re: How to read the submit button as a name or valu <v0xman@yahoo.com>
        Solaris7 (sparc) Sockets - resource temporarily unavali <simon.chester@dial.pipex.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sat, 31 Jul 1999 10:19:38 -0400
From: Philippe Galipeau <pgalipo@cam.org>
Subject: ActivePerl Build 815 Setup Problem (NEED HELP)
Message-Id: <37A305F9.A2170C10@cam.org>

This is a multi-part message in MIME format.
--------------CDD84C1EB21E99FB98F8C151
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

APi518e freezes on the message of  "configurating perl, this may take
some
moments" right after updating my autoexec.bat file for the path.

I've been looking in to my task manager and it says Perl setup [Not
Responding]

My OS system is Win98. And I Have setup perl on my C:\Perl. C: Drive
spacing 140 meg

Now I have 2 Questions

Why is the setup freezes at the end ?
Will Perl buid 518e still work correctly if setup is not complet ?

pgalipo@cam.org




--------------CDD84C1EB21E99FB98F8C151
Content-Type: text/x-vcard; charset=us-ascii;
 name="pgalipo.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Philippe Galipeau
Content-Disposition: attachment;
 filename="pgalipo.vcf"

begin:vcard 
n:Galipeau;Philippe
tel;home:(450) 463-2691
tel;work:(450) 463-2691
x-mozilla-html:FALSE
org:Système OPAG System
adr:;;500 de Roussillon, apt. 3;Longueuil;Quebec;J4H 3R7;
version:2.1
email;internet:pgalipo@cam.org
title:Concepteur
note:ICQ # : 4146396
x-mozilla-cpt:;-12816
fn:Philippe Galipeau
end:vcard

--------------CDD84C1EB21E99FB98F8C151--



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

Date: Sat, 31 Jul 1999 10:25:21 -0400
From: Philippe Galipeau <pgalipo@cam.org>
Subject: Re: ActivePerl Build 815 Setup Problem (NEED HELP)
Message-Id: <37A3074F.B5224F4F@cam.org>

This is a multi-part message in MIME format.
--------------54AC433E8F839F1A9B156CAC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

It's me again.

With an other question

How can I properly setup ActivePerl Build 815 ?



Philippe Galipeau wrote:

> APi518e freezes on the message of  "configurating perl, this may take
> some
> moments" right after updating my autoexec.bat file for the path.
>
> I've been looking in to my task manager and it says Perl setup [Not
> Responding]
>
> My OS system is Win98. And I Have setup perl on my C:\Perl. C: Drive
> spacing 140 meg
>
> Now I have 2 Questions
>
> Why is the setup freezes at the end ?
> Will Perl buid 518e still work correctly if setup is not complet ?
>
> pgalipo@cam.org

--------------54AC433E8F839F1A9B156CAC
Content-Type: text/x-vcard; charset=us-ascii;
 name="pgalipo.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Philippe Galipeau
Content-Disposition: attachment;
 filename="pgalipo.vcf"

begin:vcard 
n:Galipeau;Philippe
tel;home:(450) 463-2691
tel;work:(450) 463-2691
x-mozilla-html:FALSE
org:Système OPAG System
adr:;;500 de Roussillon, apt. 3;Longueuil;Quebec;J4H 3R7;
version:2.1
email;internet:pgalipo@cam.org
title:Concepteur
note:ICQ # : 4146396
x-mozilla-cpt:;-12816
fn:Philippe Galipeau
end:vcard

--------------54AC433E8F839F1A9B156CAC--



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

Date: Sat, 31 Jul 1999 10:54:40 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Announcement: "CRAP"
Message-Id: <Pine.GSO.4.10.9907311053120.22353-100000@crusoe.crusoe.net>

WHAT IS CRAP?
    Have you seen a program written by someone else, and sighed,
    saying:

    "Was this person a C programmer?"
    "Why the hell did they do THAT?"
    "`use Wheel::Reinvent;'"

    Have you witnessed the use of an insecurely written Perl 4
    program, written in the days of Perl 5, with dangerous
    operations, superfluous comments, easy-to- miss configuration
    variables, and inefficiencies?

    If you are, then you can benefit from my Crusade to Reconstruct
    Awful Programs (CRAP). CRAP is dedicated to reconstructing many
    of the broken programs used by the less informed members of the
    Perl community. The big problem is that these broken programs
    get used by more and more people that don't understand Perl at
    all, and so they don't know why they shouldn't use them. They
    don't understand that a text counter can be remotely exploited,
    or that they will not be alive when the year 19100 really does
    roll around. The non-programmers using these poorly coded
    programs must be informed, and that can start with the
    programmers being informed. And that's where you come in.

    Program Authors
            Have you written a poorly coded -- possibly broken --
            program? Have you also proliferated it? Are many people
            using it, unaware of a hidden bug or amazing
            inefficiency? You can help CRAP.

    Programmers
            Have you rewritten a poorly written program? Do you have
            beautification skills? Can you spot inefficiencies,
            bugs, errors, and misinformation in programs? Can you
            document your code well? You can help CRAP.

    Users   Have you used a program that you are unsure of? Do you think
            the program is written poorly, has poor documentation,
            or is broken under certain conditions? Can you
            articulate your problem with the program? You can help
            CRAP.

    CRAP, although a biting acronym and title, is about helping the
    programming community. Why use a broken, 500-line program, when
    a working, 50-line, well- documented program works much better?
    Why mingle in the affairs of CGI queries when there is already a
    super pre-rolled module for dealing with CGI? Why reinvent the
    wheel, folks?

    If you're an author, we need people to fess up, and tell us
    about programs they've written that don't work, or are in need
    of repairs. You can help us with the analysis. Tell us what's
    broken, what you wanted it to do. And tell us what resources you
    used: other code, books, web sites, etc. If you've been given
    poor information, we can correct that, and we want to know where
    poor programming habits are being generated.

    If you're a programmer, we need you to look at and create an
    article about a particular program... discuss it, analyze it,
    reconstruct it even. And you must have the ability to document
    the code you write. Explain it. Use POD, and keep in-code
    comments to a minimum. The rewritten program will be made
    available along with the original program, and the article you
    write. The rewritten program will help teach people how to code
    more efficiently.

    If you're a user, we need you to inform us of programs you've
    used that you're not to sure of. Tell us where you got it, what
    it's called, what it does, and when you found it. We want to
    help upgrade existing Perl 4 programs to Perl 5. Let us know
    about these poorly written programs before more people use them.

WHERE DO I SIGN UP?
    If you're interested in helping CRAP with its message of
    reformation, please visit CRAP's web site,
    http://www.pobox.com/~japhy/perl/crap.

    Face it. Friends don't let friends use bad code.

AUTHOR
    Jeff "(localtime)[5] + 1900" Pinyan is causing a ruckus, daily,
    in Waldwick, NJ. He can be reached at japhy@pobox.com,
    japhy+perl@pobox.com (for Perl related things), and
    japhy+crap@pobox.com (for CRAP related things).


-- 
jeff pinyan    japhy@pobox.com
japhy's little hole in the (fire) wall:   http://www.pobox.com/~japhy
perl stuff     japhy+perl@pobox.com
japhy's perl supposit^Wrepository:        http://www.pobox.com/~japhy/perl
CPAN ID: PINYAN            http://www.perl.com/CPAN/authors/id/P/PI/PINYAN



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

Date: 31 Jul 1999 05:34:41 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <37a2df51@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    Andrew Fry <andrewf@beausys.demon.co.uk> writes:
:BTW. I am *NOT* for one moment suggesting that it is never worth reading
:the FAQ and documentation. I am just saying that us newbies are under
:time pressures also, and we dont always have the luxury of time to
:plough through manuals (even if we knew our way around them!).

If one cannot learn to use fast text searching programs and techniques
for the documents on one's very own system, I suspect that one has other
crippling disabilities as well and will consequently never amount to
much of a success in this field.

--tom
-- 
"Amusement is for the sake of relaxation, and relaxation is of necessity
 sweet, for it is the remedy of pain caused by toil; and intellectual
 enjoyment is universally acknowledged to contain an element not only of the
 noble but of the pleasant, for happiness is made up of both." - Aristotle   


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

Date: Sat, 31 Jul 1999 13:27:34 +0100
From: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <Coq$PGA2uuo3EwH8@beausys.freeserve.co.uk>

In article <37a2df51@cs.colorado.edu>, Tom Christiansen
<tchrist@mox.perl.com> writes
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, 
>    Andrew Fry <andrewf@beausys.demon.co.uk> writes:
>:BTW. I am *NOT* for one moment suggesting that it is never worth reading
>:the FAQ and documentation. I am just saying that us newbies are under
>:time pressures also, and we dont always have the luxury of time to
>:plough through manuals (even if we knew our way around them!).
>
>If one cannot learn to use fast text searching programs and techniques
>for the documents on one's very own system, I suspect that one has other
>crippling disabilities as well and will consequently never amount to
>much of a success in this field.
>
>--tom

How very patronising.

---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).


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

Date: Sat, 31 Jul 1999 12:21:50 +0100
From: Catherine <cath@myspace.force9.co.uk>
Subject: Capturing the next line
Message-Id: <37A2DC4E.A17A64A3@myspace.force9.co.uk>

Hi, I'm a beginner in PERL, this is probably a very stupid question but
I've spent days reading the book and still can't find the answer.

When I've found a word in a file, how can I capture the next line of
that word and save that into a variable? Please help!

Thanks in advance.

Catherine



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

Date: Sat, 31 Jul 1999 07:25:55 -0400
From: "Wing" <wingcma@mailexcite.com>
Subject: Re: Capturing the next line
Message-Id: <rq5nbrmp5mn5ta@corp.supernews.com>

This is a multi-part message in MIME format.

------=_NextPart_000_0251_01BEDB25.ED9B3F80
Content-Type: text/plain;
	charset="x-user-defined"
Content-Transfer-Encoding: quoted-printable

Hi.
    This sould do it.
    while (<FILE>)
    {
        if (/pattern/i)
        {
            $saveIt =3D <FILE>;
        }
    }
--=20
Thanks.
Wing
__
Yesterday is History, Tomorrow is a Mystery, and Today is a gift: that's =
why we call it The Present. . .
Catherine <cath@myspace.force9.co.uk> wrote in message =
news:37A2DC4E.A17A64A3@myspace.force9.co.uk...
> Hi, I'm a beginner in PERL, this is probably a very stupid question =
but
> I've spent days reading the book and still can't find the answer.
>=20
> When I've found a word in a file, how can I capture the next line of
> that word and save that into a variable? Please help!
>=20
> Thanks in advance.
>=20
> Catherine
>=20

------=_NextPart_000_0251_01BEDB25.ED9B3F80
Content-Type: text/html;
	charset="x-user-defined"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dx-user-defined" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY background=3D"" bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;This =
sould&nbsp;do=20
it.<BR>&nbsp;&nbsp;&nbsp; while (&lt;FILE&gt;)<BR>&nbsp;&nbsp;&nbsp;=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
(/pattern/i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
$saveIt=20
=3D &lt;FILE&gt;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>-- <BR>Thanks.<BR>Wing<BR>__<BR>Yesterday =
is=20
History, Tomorrow is a Mystery, and Today is a gift: that's why we call =
it The=20
Present. . .<BR>Catherine &lt;cath@myspace.force9.co.uk&gt; wrote in =
message=20
news:37A2DC4E.A17A64A3@myspace.force9.co.uk...<BR>&gt; Hi, I'm a =
beginner in=20
PERL, this is probably a very stupid question but<BR>&gt; I've spent =
days=20
reading the book and still can't find the answer.<BR>&gt; <BR>&gt; When =
I've=20
found a word in a file, how can I capture the next line of<BR>&gt; that =
word and=20
save that into a variable? Please help!<BR>&gt; <BR>&gt; Thanks in=20
advance.<BR>&gt; <BR>&gt; Catherine<BR>&gt; </FONT></DIV></BODY></HTML>

------=_NextPart_000_0251_01BEDB25.ED9B3F80--



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

Date: Sat, 31 Jul 1999 14:38:38 +0200
From: "Igor \"Lepi\"" <igor@attractive.com>
To: <comp.lang.perl.misc@list.deja.com>
Subject: Re: Cookies and CGI::Cookie
Message-Id: <00e901bedb51$9ddfdb00$160370d4@sex.com>

Hi,
>
> ----------
>
> #!/usr/bin/perl
> use CGI qw/:standard/;
> use CGI::Cookie;
>
> $dIMAGE = "IMG" . $b;
> $cookieIMG . $b = new CGI::Cookie(-name   => $dIMAGE,  -value =>
$localImge[$j] );
                        ^
                    Here is the concatenation, you are trying to join
($cookieIMG . $b) AND then assign the Cookie OBJECT ,

Btw ,.  new CGI::Cookie returns an object Read the docs for CGI::Cookie for
how to use it.

/Igor




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


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

Date: 31 Jul 1999 05:31:53 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to read the submit button as a name or value
Message-Id: <37a2dea9@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    bart.lateur@skynet.be (Bart Lateur) writes:
:If you need to invoke that AUTLOAD mechanism a lot, and I assume it will
:happen as soon as you do *anything*, it will slow things down quite a
:bit.

You're counting angels dancing on the head of a pin. "Quite a bit" 
is like saying that going from a 1 in 10 million cancer sisk to a 
1 in 5 million cancer risk is "quite an increase", since you've just
doubled the chance.  

Big deal.   A few thousands of a microsecond here and there account
for nothing.  And you should look into the way AUTOLOADing is being used
before you disparage it.  It's not as though you pay the cost repeatedly.

:CGI::REquet, OTOH, doesn't depend on AUTOLOAD.

It's not standard.  That's enough to indict it.  It's a terribly onerous
burden.

--tom
-- 
              A truly wise man never plays leapfrog with a unicorn.


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

Date: Sat, 31 Jul 1999 11:47:38 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How to read the submit button as a name or value
Message-Id: <37a2e0fd.255291@news.skynet.be>

Tom Christiansen wrote:

>:CGI::Request, OTOH, doesn't depend on AUTOLOAD.
>
>It's not standard.

Yet.

It's part of the CGI-modules package. Look who's the mainatiner of that
package, according to the README? Lincoln D. Stein. Who wrote CGI.pm?
Lincoln D. Stein. What did he write under the header "bugs", in CGI.pm?

   This module has grown large and monolithic.  Furthermore it's doing
   many things, such as handling URLs, parsing CGI input, writing HTML,
   etc., that are also done in the LWP modules. It should be discarded
  in favor of the CGI::* modules, but somehow I continue to work on it.

	Bart.


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

Date: Sat, 31 Jul 1999 14:43:01 +0200
From: "Igor \"Lepi\"" <igor@attractive.com>
To: <comp.lang.perl.misc@list.deja.com>
Subject: Re: How to read the submit button as a name or value
Message-Id: <00f701bedb52$3ac9fdb0$160370d4@sex.com>

>
> On my page I have more than one submit button with different names and
> values ...
>
> how can do I get perl to read the input below?

The only value that get sent to your script is the button that gets clicked
on the form ,

Btw, have you tried to use CGI.pm,
its easier to use ,

/Igor





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


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

Date: Sat, 31 Jul 1999 13:09:20 GMT
From: arpith@hotmail.com
Subject: Modifying file permissions from a pl script
Message-Id: <7nushu$5qi$1@nnrp1.deja.com>

Hi,

How will I be able to modify the file permissions of a file from a perl
script ? Will this work: print `chmod 777 txtfile`;

It didn't for me. is it supposed to ?

Is there any other way of making a certain file writable etc. Can you
please give me an example.

Thanks a lot,

Arpith.


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


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

Date: Sat, 31 Jul 1999 18:52:26 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Modifying file permissions from a pl script
Message-Id: <7o02dk$q0h1@news.cyber.net.pk>

: Hi,
:
: How will I be able to modify the file permissions of a file from a perl
: script ? Will this work: print `chmod 777 txtfile`;
:
: It didn't for me. is it supposed to ?

It should work if you are on a .+n[iu]x host!

:
: Is there any other way of making a certain file writable etc. Can you
: please give me an example.

perldoc -f chmod

eg: chmod 0666 , "blah.txt";
eg: chmod 0666 , <*.txt>;

:
: Thanks a lot,




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

Date: Sat, 31 Jul 1999 10:52:38 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Modifying file permissions from a pl script
Message-Id: <Pine.GSO.4.10.9907311050430.22353-100000@crusoe.crusoe.net>

[posted & mailed]

> Is there any other way of making a certain file writable etc. Can you
> please give me an example.

you can use Perl's builtin chmod() function (perldoc -f chmod)...

or, to make the file writable, despite its current setting, you can do
something like this:

use File::chmod;

$File::chmod::UMASK = 0;
chmod "+w", "filename" or die "couldn't chmod +w filename: $!";


-- 
jeff pinyan    japhy@pobox.com
japhy's little hole in the (fire) wall:   http://www.pobox.com/~japhy
perl stuff     japhy+perl@pobox.com
japhy's perl supposit^Wrepository:        http://www.pobox.com/~japhy/perl
CPAN ID: PINYAN            http://www.perl.com/CPAN/authors/id/P/PI/PINYAN



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

Date: Sat, 31 Jul 1999 11:15:54 +0100
From: Andrew Fry <andrewf@beausys.demon.co.uk>
Subject: Re: Newbie Q: How to check if invoked as CGI program
Message-Id: <ewBl2HAazso3EwES@beausys.freeserve.co.uk>

In article <7nqsf2$oo06@news.cyber.net.pk>, Faisal Nasim
<swiftkid@bigfoot.com> writes
>: The question is ... is there a foolproof way of being able to detect
>: how the program was invoked ? ... and thus determine the appropriate
>: mode to adopt.
>
>Check out the contents of %ENV in both cases.

And what would I expect to find ?

---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).


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

Date: Sat, 31 Jul 1999 07:34:18 -0400
From: "Wing" <wingcma@mailexcite.com>
Subject: Perl bug?
Message-Id: <rq5nrgfb5p55ta@corp.supernews.com>

Hi.
    I think I've tumbled on a bug.  Whenever I try to read a file that
contains the character 0x1a with the following script, it reads the content
only upto that character.
open FILE, 'test.txt' or die "Can't open test.txt for input\n";
$len = 0;
stat ('test.txt');
$fileLen = -s _;
while (<FILE>)
{
  print ;
  $len += length ($_);
}
print "\n$len\n$fileLen" if ($len != $fileLen);
close (FILE);
--
Thanks.
Wing
__
Yesterday is History, Tomorrow is a Mystery, and Today is a gift: that's why
we call it The Present. . .






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

Date: Sat, 31 Jul 1999 07:54:15 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl bug?
Message-Id: <MPG.120cadecc5df27a0989d84@nntp.hpl.hp.com>

[Posted and a courtesy copy sent to the poster and to TomC.]

In article <rq5nrgfb5p55ta@corp.supernews.com> on Sat, 31 Jul 1999 
07:34:18 -0400, Wing <wingcma@mailexcite.com> says...
>     I think I've tumbled on a bug.  Whenever I try to read a file that
> contains the character 0x1a with the following script, it reads the content
> only upto that character.

The 'bug' is a design misfeature.  We can safely assume that the evil 
purveyors of your so-called operating system ripped off this misfeature 
from CP/M also, along with so many other idiocies.

In that infamous lineage, files are divided dichotomously: text and 
binary.  Within text files, the character "\cZ" (Control-Z, 0x1A) 
indicates end-of-file, presumably so that multiple subfiles can be 
contained within one file.  I doubt that anyone actually uses this 
capability nowadays.

You can treat your file as binary (which it probably is), and use the 
binmode() function immediately after opening it.  This has the 
additional benefit that the number of characters you read from the file 
will be the same as the size of the file, and seeks and tells will work 
meaningfully.  If in fact it is a text file, you will have to strip the 
"\r" from the line-endings "\r\n" yourself.

Note to TomC:  I couldn't find any mention of this misfeature in 
perlport.  Maybe it's worth a sentence or two.
 
-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Sat, 31 Jul 1999 08:56:27 -0400
From: <joeyandsherry@mindspring.com>
Subject: pipes vs csv
Message-Id: <7nuro6$s8n$1@nntp8.atl.mindspring.net>

passme

Hello,

Thanks in advance. I am a student of Perl and have been using it quite
effectively for many CGI applications. A great many of them involve database
management. I have already found through the evolution of programming that a
particular habit or style I cultivated was not a very good practice, as I
learned something new. Well to prevent this in the future learning...

Is there an advantage or disadvantage of using pipes versus commas as field
delimiters in flat text files? I have been successfully using commas, but
have run into a few problems here and there, and was thinking that pipes
would eliminate this potential.

Thanks again.

Joey
-The Race is to the Driven, Not the Swift.





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

Date: Sat, 31 Jul 1999 18:55:07 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: pipes vs csv
Message-Id: <7o02if$r8l1@news.cyber.net.pk>

: passme

passed! :)

: Hello,

hi!

: Thanks in advance. I am a student of Perl and have been using it quite

Thanx accepted!

: effectively for many CGI applications. A great many of them involve
database
: management. I have already found through the evolution of programming that
a

database ... cool!

: particular habit or style I cultivated was not a very good practice, as I
: learned something new. Well to prevent this in the future learning...
:
: Is there an advantage or disadvantage of using pipes versus commas as
field
: delimiters in flat text files? I have been successfully using commas, but
: have run into a few problems here and there, and was thinking that pipes
: would eliminate this potential.

It depends, if you take input from users and put it into a flat file, and do
not do parsing on the input, you are most likely to get problems!

A nice alternative (which I use when I use plain db, rarely!), its \0
null char, I also remove all \0 from the users' input as .....

Enjoy!




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

Date: Sat, 31 Jul 1999 12:16:30 +0200
From: "Jan Creemers" <softwareconnection@compuserve.com>
Subject: Problem with installation of Win32GUI, please help
Message-Id: <7nuhr3$qjn$1@ssauraaa-i-1.production.compuserve.com>

Hi,

I just installed Win32GUI-Beta.
Installation was simple and looked ok, but I can't even run one of he
examples.
When I run an example script I receive the error:

> Can't load 'C:/ActivePerl/site/lib/auto/Win32/GUI/GUI.dll' for module
Win32::GUI: load_file : The
> specified module could not be foun at C:/ActivePerl/lib/Dynaloader.pm line
169

I have already tried to copy it elsewhere and looked inside the modules, but
I don't now
how to solve. It must be simple for others I suppose.

I copied the Win32GUI-Beta.zip in a working dir. and after extraction, run
the install.

----------------------------------------------------------------------------
------------
 Volume in drive C has no label.
 Volume Serial Number is 603A-0C10

 Directory of C:\X

01/08/99  11:25         <DIR>          .
01/08/99  11:25         <DIR>          ..
30/05/98  00:47                232.960 GUI.dll
30/05/98  00:50                 30.373 GUI.pm
07/06/98  17:50                  1.896 install.bat
07/06/98  17:49                    729 README
07/06/98  17:49                    729 README.TXT
22/07/99  12:23                 62.941 Win32GUI-Beta-bin-500404.zip
22/07/99  12:23                 96.413 Win32GUI-Beta.zip
               9 File(s)        426.041 bytes
                          3.880.790.016 bytes free

Result of installation
----------------------

   Win32::GUI version Beta Install Program
   by Aldo Calpini <dada@divinf.it>

Copying GUI.pm to C:\ActivePerl\site\lib\Win32...
Copying GUI.dll to C:\ActivePerl\site\lib\auto\Win32\GUI...
Installation complete.
-----------------------------------------------------------

Thanks for help,

Jan Cremers




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

Date: Sat, 31 Jul 1999 12:32:00 +0200
From: "Jan Creemers" <softwareconnection@compuserve.com>
Subject: Problem with installation of Win32GUI, please help
Message-Id: <7nuio6$5qe$1@ssauraac-i-1.production.compuserve.com>

Hi,

I just installed Win32GUI-Beta.
Installation was simple and looked ok, but I can't even run one of he
examples.
When I run an example script I receive the error:

> Can't load 'C:/ActivePerl/site/lib/auto/Win32/GUI/GUI.dll' for module
Win32::GUI: load_file : The
> specified module could not be foun at C:/ActivePerl/lib/Dynaloader.pm line
169

I have already tried to copy it elsewhere and looked inside the modules, but
I don't now
how to solve. It must be simple for others I suppose.

I copied the Win32GUI-Beta.zip in a working dir. and after extraction, run
the install.

----------------------------------------------------------------------------
-----------
Volume in drive C has no label.
Volume Serial Number is 603A-0C10

Directory of C:\X

01/08/99  11:25         <DIR>          .
01/08/99  11:25         <DIR>          ..
30/05/98  00:47                232.960 GUI.dll
30/05/98  00:50                 30.373 GUI.pm
07/06/98  17:50                  1.896 install.bat
07/06/98  17:49                    729 README
07/06/98  17:49                    729 README.TXT
22/07/99  12:23                 62.941 Win32GUI-Beta-bin-500404.zip
22/07/99  12:23                 96.413 Win32GUI-Beta.zip
               9 File(s)        426.041 bytes
                          3.880.790.016 bytes free

Result of installation
----------------------

   Win32::GUI version Beta Install Program
   by Aldo Calpini <dada@divinf.it>

Copying GUI.pm to C:\ActivePerl\site\lib\Win32...
Copying GUI.dll to C:\ActivePerl\site\lib\auto\Win32\GUI...
Installation complete.
-----------------------------------------------------------

Thanks for help,

Jan Cremers







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

Date: Sat, 31 Jul 1999 12:05:43 +0200
From: "Jan Creemers" <softwareconnection@compuserve.com>
Subject: Problem with installing Win32GUI-Beta, please help
Message-Id: <7nuh9u$psr$1@ssauraaa-i-1.production.compuserve.com>

Hi,

I just installed Win32GUI-Beta.
Installation was simple and looked ok, but I can't even run one of he
examples.
When I run an example script I receive the error:

> Can't load 'C:/ActivePerl/site/lib/auto/Win32/GUI/GUI.dll' for module
Win32::GUI: load_file : The
> specified module could not be foun at C:/ActivePerl/lib/Dynaloader.pm line
169

I have already tried to copy it elsewhere and looked inside the modules, but
I don't know how to solve.
It must be simple for others I suppose.

I copied the Win32GUI-Beta.zip in a working dir. and after extraction, run
the install.
----------------------------------------------------------------------------
--------------
 Volume in drive C has no label.
 Volume Serial Number is 603A-0C10

 Directory of C:\X

01/08/99  11:25         <DIR>          .
01/08/99  11:25         <DIR>          ..
30/05/98  00:47                232.960 GUI.dll
30/05/98  00:50                 30.373 GUI.pm
07/06/98  17:50                  1.896 install.bat
07/06/98  17:49                    729 README
07/06/98  17:49                    729 README.TXT
22/07/99  12:23                 62.941 Win32GUI-Beta-bin-500404.zip
22/07/99  12:23                 96.413 Win32GUI-Beta.zip
               9 File(s)        426.041 bytes
                          3.880.790.016 bytes free

Result of installation
----------------------

   Win32::GUI version Beta Install Program
   by Aldo Calpini <dada@divinf.it>

Copying GUI.pm to C:\ActivePerl\site\lib\Win32...
Copying GUI.dll to C:\ActivePerl\site\lib\auto\Win32\GUI...
Installation complete.
----------------------------------------------------------------------------
--------------

Thanks for help,

Jan Cremers




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

Date: Sat, 31 Jul 1999 07:31:37 -0300
From: "Vox" <v0xman@yahoo.com>
Subject: Re: Re: How to read the submit button as a name or value
Message-Id: <djAo3.43622$jl.30665631@newscontent-01.sprint.ca>


Abigail <abigail@delanet.com> wrote in message
news:slrn7q2k94.fmt.abigail@alexandra.delanet.com...
Vox (v0xman@yahoo.com) wrote on MMCLIX September MCMXCIII in
<URL:news:uXao3.42463$jl.29878042@newscontent-01.sprint.ca>:
**
** %% To get the users input and configure it I do the code below:
** %%
** %% read(STDIN, $input, $ENV{'CONTENT_LENGTH'})
**
** >Stop! Do not use such code. Why don't you use CGI.pm?
**
**
** What do you mean by 'Do not use such code'.  It works fine for getting
the
** input from users and what is CGI.pm?


>It works fine, till it breaks at the most inconvenient time - for instance
>when giving a demo before a client.

>Read up what read() does.


>As for CGI.pm: "man CGI".



>Abigail


To tell you the truth I am learning as I go along with CGI I am not taking
much in courses or anything as of yet.  At the moment I have been mostly
copying from programs and pasting them together to make other programs.  Now
that read() command was actually mostly copied from a part of Matt Wrights
Formmail and a part of some Free for all links page.  One of those must have
giving me the wrong code or maybe I put them together wrong.  Anyways these
codes are mostly for my small site at the moment and don't have any clients
to show it to except the occasional users at my site.

I will look into CGI.pm and reading up on exactly what read() does.  Thank
you for your help.




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

Date: Sat, 31 Jul 1999 11:13:49 +0100
From: Simon Chester <simon.chester@dial.pipex.com>
Subject: Solaris7 (sparc) Sockets - resource temporarily unavalible (permanently  )
Message-Id: <37A2CC5D.B0A63710@dial.pipex.com>

I have a server program (written in C) running on an Ultra10 - solaris7,
with clients (perl) running on different architectures.
The clients are 

Solaris7 (Ultra10) - Perl 5.005_2
RedHat Linux 5.2 (intel) - Perl 5.004_4 

I'm using IO::Socket and POSIX

The client is creating the socket via $sock = new IO::Socket::INET
 ...etc.
This is all fine..

Non-blocking is set on the socket using fcntl( ....

The client writes to the socket using print.

The server reads this message fine .. and sends back an OK..

The client tries to read a character at a time (I've also tried sysread)
from socket this works fine and dandy for
the Linux client that reads the "ok" message. - fine.

The Solaris7 client on the other hand (N.B. same arch. as the server)
the read( or sysread ) returns undefined with a $! of 
resource temporarily unavailable. ( so I poll the socket trying to read
from it but it gives me the same error message indefinitely )


Any suggestions/help/advice would be greatly appreciated with the
exception of the following:

1) Arrr - that means you can't read from the socket because its
temporarily unavalible
2) Ditch solaris because linux is cooler anyway

Cheers


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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 V9 Issue 321
*************************************


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