[7161] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 786 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 28 11:17:49 1997

Date: Mon, 28 Jul 97 08:00:34 -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, 28 Jul 1997     Volume: 8 Number: 786

Today's topics:
     Re: 'case' like statements, is it SWITCH? ( Thomas Lachlan XMS x4206 )
     Re: [Q] Read/Write Microsoft CVS files.... (Clay Irving)
     Re: ANYONE KNOW OF A GOOD BOOK FOR LEARNING PERL (Andrew Starr)
     Building perl5.004 with cygwin on NT4 failure (Danny Aldham)
     cgi-lib.pl: File uploading problem (Dirge )
     Comm.pl problem <gharfst@students.uiuc.edu>
     encrypt() create the same passwd string for the same pa (Gil)
     Re: encrypt() create the same passwd string for the sam (brian d foy)
     Form2mail <toot@inter.net.il>
     Re: Help with RSH command ( Thomas Lachlan XMS x4206 )
     Re: Help with RSH command ( Thomas Lachlan XMS x4206 )
     Re: Help with RSH command ( Thomas Lachlan XMS x4206 )
     How can I get user date and user time with Perl? <insel@msn.com>
     How to print multiple images grebeint@singnet.com.sg
     I still can't install perl5 (Ling Hua)
     I'm looking for a perl logo... <mustun@active.ch>
     Re: Installing Perl under NT with IIS (Parillo)
     interesting sorting problem <craig@mathworks.com>
     Location with target ??? <dimitri@dimitri.net>
     Re: Perl for win 95 ? (Parillo)
     Question: How to execute a program and read results a@123.com
     Question: How to use sockets a@123.com
     Source Code I have and Need! <chizl@bigfoot.com>
     Re: Too many people in this group are arrogant #*(@# (R <flavell@mail.cern.ch>
     Re: Too many people in this group are arrogant #*(@# (R <jbokma@caiw.nl>
     Re: turning off "<variable name> used only once" warnin <gt5146c@acmez.gatech.edu>
     Re: where is FAQ, how to use $ENV <clark@s3i.com>
     Re: XS: file handles <jheck@merck.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 28 Jul 1997 10:28:47 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: 'case' like statements, is it SWITCH?
Message-Id: <5rhs8v$5cm@newstoo.ericsson.se>

Pui Ming WONG (s11976@net2.hkbu.edu.hk) wrote:
: I'm quite used to the using the 'case' --->  'esac' statements
: in writing my shell scripts.
: Now i would like such similar statements in perl. I read the
: manual and the 'switch' statments look like it. BUT, the examples
: i saw have 'if's using together with the switch', which i think
: to myself, then why not just use ifs.
: Is 'switch' really the 'case' equivalents . If so, what should it
: be like in perl.
: If not, what other semantics will do the 'case' like branches under perl?
: --
:         __
:    / \_/  )             __   Pui Ming WONG (E-mail: pm@hkbu.edu.hk) 
:   /      ( -------------  }  System Support Programmer
:  (  =l=ll===============__}  Computing & Telecomm. Services Centre
:   \   _  (                   Hong Kong Baptist University 
:    \_/ \__)                  224 Warerloo Road, Hong Kong 


Hello Pui,
	Have a look at this:  
	for ($choice) {
		SWITCH: {
			/^1/ && do {
				print SOMEHWERE "Something...\n";
				};
			/^2/ && do {
				print SOMEWHERE "Something else...\n";
				};
			}
		}

		Hope this helps.
					Regards Tom.


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

Date: 28 Jul 1997 09:28:37 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: [Q] Read/Write Microsoft CVS files....
Message-Id: <5ri6q5$7sg@panix.com>

In <33DB325A.41C67EA6@ornet.co.il> Ricardo Marek <ricky@ornet.co.il> writes:

>Does someone has a package/script for reading and writting CSV formated
>files into a perl-script? I'm sure someone has allready implemented 
>a bunch of functions that deal with CSV files. (or package for it)

>Please answer via e-mail to ricky@ornet.co.il.

>BTW Why to re-invent the wheel?

Perl Modules are your friend.

  Text::CSV
  ftp://ftp.mcs.net/mcsnet.users/apc/Text-CSV-0.01.tar.gz
  Text::CSV provides facilities for the composition and decomposition of 
  comma-separated values. An instance of the Text::CSV class can combine 
  fields into a CSV string and parse a CSV string into fields. 
 
-- 
Clay Irving <clay@panix.com>                   http://www.panix.com/~clay/


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

Date: Mon, 28 Jul 1997 00:26:44 -0500
From: atspublic@bigfoot.com (Andrew Starr)
Subject: Re: ANYONE KNOW OF A GOOD BOOK FOR LEARNING PERL
Message-Id: <atspublic-ya02408000R2807970026440001@news.qni.com>

In article <33DAD583.4009C2AB@hotmail.com>, Larry D'Anna
<ldanna@hotmail.com> wrote:

> Randall's "Learning Perl" is an excellent introduction

Make sure you don't get the first edition. Instead, get the second edition,
which is due out this month.

-- 
Andrew Starr  <mailto:atspublic@bigfoot.com>
http://www.amherst.edu/~atstarr/eudora has my unoff. Eudora Site
http://www.amherst.edu/~atstarr/eudora/faq.html by Hank Zimmerman
I have no connection to Qualcomm other than being a happy customer!
If I am answering a question: please post followup questions to the
newsgroup as well as mailing me a copy. For new questions, please just post
to the newsgroup. Thank you.


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

Date: 27 Jul 1997 22:09:06 -0700
From: danny@lennon.postino.com (Danny Aldham)
Subject: Building perl5.004 with cygwin on NT4 failure
Message-Id: <5rh9hi$kk3$1@lennon.postino.com>

Using GNU-win32 b18 gcc to build perl5.004_01 , I am getting to the point
of compiling miniperl when the make fails with:
 gcc2 -o miniperl miniperlmain.o libperl.a -lcygwin -lm -lc -lkernel32
 libperl.a(pp_sys.o)(.text+0x602f):pp_sys.c: undefined reference to `setpwent'
 gcc: Internal compiler error: program ld got fatal signal 1
 make: *** [miniperl} Error 1

--
Danny Aldham           SCO Ace , MCSE , JAPH , DAD
I don't need to hide my e-mail address, I broke my sendmail.


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

Date: 28 Jul 1997 08:10:12 GMT
From: mjw101@york.ac.uk (Dirge )
Subject: cgi-lib.pl: File uploading problem
Message-Id: <5rhk54$9or$1@netty.york.ac.uk>

Hiya,

I'm having a few problems trying to get the file upload working correctly:
using the simple version, I can upload the file to the machine no problem,
but when I try to use $cgi-lib'writefiles to spool the file to disk rather
than using mucho memory, I'm having no joy: it keeps coming back with:
	Couldn't open /tmp/cgi-lin.$$.$$$
which is hardly surprising, given that I am a) on an NT server and b) have
no /tmp or even \tmp.

Anyone got any pointers?

--
Michael
"May all your dreams - bar one - be fulfilled"
	A Sathuli blessing from the Drenai novels by David Gemmel.



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

Date: Mon, 28 Jul 1997 08:29:36 -0500
From: Greg Harfst <gharfst@students.uiuc.edu>
Subject: Comm.pl problem
Message-Id: <Pine.SOL.3.91.970728082819.18903A-100000@ux4.cso.uiuc.edu>

       I am trying to use the Comm.pl from CPAN.  I put the 
require 'Comm.pl'; line in my code, but when I try to access one of it's 
functions (specifically open_proc), it says :

Undefined subroutine &main::open_proc called at ./testio2.pl line 4.

Here is my code:
#!/usr/local/perl5/bin/perl
require '/home/html/shamrm/public_html/PerlLib/Comm.pl';

$ph = open_proc('cat -n');
for (1..10) {
        print $ph "a line=n";
        print "got back ", scalar <$ph>;
}

exit();

        Can anybody tell me why I am getting this error and what I can do
to fix this problem?  Thanks.

Greg Harfst
gharfst@uiuc.edu



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

Date: Mon, 28 Jul 1997 05:56:13 GMT
From: mingtian@hotmail.com (Gil)
Subject: encrypt() create the same passwd string for the same passwd :(
Message-Id: <33dc33ee.249580@usenet.kornet.nm.kr>

htpasswd(comilped by htpasswd.c) can create the different
passwd string with time function(maybe..) but crypt() function
in Perl5 create the same string for the same two or more passwds,
how can i have it have the different ones?

 ...
Gil 
Homepage: http://soback.kornet.nm.kr/~chlang/
">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">
!F 1W4k 3*?!0T4B >pA&3* GQ<[@L 2I@L?4@84O 0q8q1f 59>F3*?@4B  !F
">   594c ?6?!<- H/Hw 9L<RA~0m @V4B 5i2I GQ<[@L?M55 00>F    ">
!F     H%@Z@V>n >5>5GQ 3*@G 0!=??! Hq8A@; @|GXAV4x 2I        !F
!F                  "4^7!<- >HAV8i ;/>n6s"                   !F
">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">


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

Date: Mon, 28 Jul 1997 03:54:51 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: encrypt() create the same passwd string for the same passwd :(
Message-Id: <comdog-ya02408000R2807970354510001@nntp.netcruiser>

In article <33dc33ee.249580@usenet.kornet.nm.kr>, mingtian@hotmail.com wrote:

> htpasswd(comilped by htpasswd.c) can create the different
> passwd string with time function(maybe..) but crypt() function
> in Perl5 create the same string for the same two or more passwds,
> how can i have it have the different ones?

use a different salt.  see the perlfunc info on crypt as well as
the crypt man page :)

-- 
brian d foy                              <URL:http://computerdog.com>                      



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

Date: 28 Jul 1997 09:58:44 GMT
From: "Lior" <toot@inter.net.il>
Subject: Form2mail
Message-Id: <01bc9b3b$607b4b80$0d9ccbc7@alekto.alekto>

Hello!
Thanks I advance for your help. I am using the Form2mail perl script for NT
and it doesn't work for me at all. I made some changes
According to the instruction they gave with the script and I get errors all
over again (The changes marked with red in the file attached).
Please help me with this one.
                                          Lior. 




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

Date: 28 Jul 1997 11:23:50 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: Help with RSH command
Message-Id: <5rhvg6$5cm@newstoo.ericsson.se>

Leon Keylin (ehtics13@mindspring.com) wrote:
: I have not seen this questioned posed and I need help with it. So
: please if you know how, give me a hand. 

: Here's what I have:
: (definition file is nodes.def which holds a list (big list) of nodes
: that I want to rsh over and run the specific K-shell script. 

: if (open(NODES, "nodes.def"))
: {
:     while($nodes= <NODES>)
:     {
:         chop($nodes);
:         print "$nodes\n";
:     }
:         foreach $nodes ($b) {
:         
:     exec "rsh $nodes -n
: directory/k-script.ksh"

: The above works only for the local node (in other words I have my own
: machine in the nodes.def file and the above program obviously does not
: r-shell over to the other machines. 

: Anyway that I can r-shell over to the other machines and run one (or
: multiple) k-shells/commands?

: Thanks in advance. 
DANGER ALERT:
When I wrote open(NODES,">./nodes.def) etc.

			what I mean't was

		open(NODES,"<./nodes.def")


		P.s. I hope you have a backup of node.def.

				Sorry Tom


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

Date: 28 Jul 1997 10:55:54 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: Help with RSH command
Message-Id: <5rhtrq$5cm@newstoo.ericsson.se>

Leon Keylin (ehtics13@mindspring.com) wrote:
: I have not seen this questioned posed and I need help with it. So
: please if you know how, give me a hand. 

: Here's what I have:
: (definition file is nodes.def which holds a list (big list) of nodes
: that I want to rsh over and run the specific K-shell script. 

: if (open(NODES, "nodes.def"))
: {
:     while($nodes= <NODES>)
:     {
:         chop($nodes);
:         print "$nodes\n";
:     }
:         foreach $nodes ($b) {
:         
:     exec "rsh $nodes -n
: directory/k-script.ksh"

: The above works only for the local node (in other words I have my own
: machine in the nodes.def file and the above program obviously does not
: r-shell over to the other machines. 

: Anyway that I can r-shell over to the other machines and run one (or
: multiple) k-shells/commands?

: Thanks in advance. 

Hi Leon,
	Try this:

		open(NODES,">./nodes.def) || die "Cannot open $!\n";
		while(<NODES>)
		{
			chomp;
			print STDOUT "Doing Node $_\n";
			`rsh $_ -n directory/k-script.ksh` ||
				next "Cannot rsh to $_ skipping..\n";
		}
		close(NODES);

			Hope this helps.

					Regards Tom.


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

Date: 28 Jul 1997 12:52:48 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: Help with RSH command
Message-Id: <5ri4n0$8k9@newstoo.ericsson.se>

Hi,
	I tried posting a follow up but it didn't work. 
	However here's the gist of it:

	open(NODES,"<./nodes.def") || die "$!\n";
	while(<NODES>)
		{
		  chomp;
		  print STDOUT "Doing Node $_\n";
		  `rsh blah blah` ||
			next "Cannot blah $_ skipping...\n";
		}
		close(NODES);

			Hope this is of help.

					Regds Tom


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

Date: Mon, 28 Jul 1997 04:02:11 -0700
From: "Matthias St|rz/Hagen Seyring" <insel@msn.com>
Subject: How can I get user date and user time with Perl?
Message-Id: <01bc9b45$b9e3e420$3dffe595@berlin>

How can i get the user date and time with Perl or the environment
variables?

Who can help me ?

Hagen, Berlin, Germany


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

Date: Mon, 28 Jul 1997 18:48:12 +0800
From: grebeint@singnet.com.sg
Subject: How to print multiple images
Message-Id: <33DC78EC.52BC@singnet.com.sg>

My problem is this.

I have 10 gif files from 0..9gifs files all have the same size and
pattern kind of numbers.
What I cannot do now is to use Perl to write 2 or more numbers back to
the calling HTML. But I can print back one gif image!
My simple code looks something like this :

open(GIF,"1.gif");
while(read(GIF,$buff,4096)
{
        print $buff;
}
close(GIF);

The above prints "1" but when I try to do the same after the codes and
print "2", it doesn't work!

Help!


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

Date: 28 Jul 1997 13:40:43 GMT
From: hua@mary.cs.fsu.edu (Ling Hua)
Subject: I still can't install perl5
Message-Id: <5ri7gr$r43$1@news.fsu.edu>

I am trying to install perl5.004_01 on to SVR4 (unisys). 
When doing "make depend", I noticed some warning message, but the program
still finished. The "make" didn't, I got 

     make: fatal error: line 510: syntax error

I checked to see that the Makefile has only less than 500 lines, so some
clue is definitely needed for me to go on.
During the "sh configure", I simply chose the default values.

Jun


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

Date: Mon, 28 Jul 1997 09:51:49 +0200
From: "M. Mustun" <mustun@active.ch>
Subject: I'm looking for a perl logo...
Message-Id: <33DC4F95.11A883D5@active.ch>

Hello

I'm looking for a perl logo?
Where can I get Perl logos/pictures?

Many thanks!

-- 

        Michael Mustun
    mailto:mustun@active.ch
 http://www2.active.ch/~mustun


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

Date: 28 Jul 1997 11:47:24 GMT
From: lparillo@newshost.li.net (Parillo)
Subject: Re: Installing Perl under NT with IIS
Message-Id: <5ri0sc$g0d$1@news01.li.net>

Could it be that the default web user does not have permission to the 
scripts directory?

lparillo at suffolk dot lib dot ny dot us

Sergio Stateri Jr (serginho@alpha.hydra.com.br) wrote:
: Hi! I installed Perl 5 under a Win NT WorkStation machine with IIS. I added
: the registry entry for .pl files call the /Perl/bin/Perl.exe interpreter.
: But...When I try to call a script in the scripts directory of IIS, the
: server tell me this :

: HTTP/1.0 403 Access Forbidden (Read Access Denied - This Virtual Directory
: does not allow objects to be read.) 

: Then I try to change the registry, and now the browser call the script, but
: it doesn't show anything and never show me the results (it's always
: running...)

: Can Anyone send me some help ? Thanks a lot.


: -- 
: --------------------------------------------
: Sergio Stateri Jr
: Sco Paulo (SP) - Brazil
: e-mail: serginho@usa.net
: --------------------------------------------


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

Date: Mon, 28 Jul 1997 09:29:05 -0500
From: Craig Ciquera <craig@mathworks.com>
Subject: interesting sorting problem
Message-Id: <33DCACB1.322C@mathworks.com>

Hello,

I have the following example set of numbers:

1.0.1.0
1.0.1.1
17.0
17.6
2.0.0.2
18.0.0.2
34.1
0.0.4.0
0.0.2.2
0.0.3.0.1.0

I'm looking for ideas on how to best sort these???

Thanks,

Craig


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

Date: Mon, 28 Jul 1997 10:40:24 +0200
From: Albino Dimitri <dimitri@dimitri.net>
Subject: Location with target ???
Message-Id: <33DC5AF8.4D34@dimitri.net>

Hi,

I'm using a simple script to implement the goto function with a form
seletc list ...

Command that send to the server the location's adress is (of course):
"Location: URL" ... it works very good and simply ...

So, I need to implement in my function the "Target Frame", such as
"http:// .... Traget=TOP"

Do You know how to do this ???

Thanks,

Dimitri Albino
E-mail: dimitri@dimitri.net


P.S.: The script, called with statement :
http://server/cgi-bin/goto.pl?GOTO=http://page... is:

#!/usr/sbin/perl
# Perl script name: goto.pl

if ( $ENV{'REQUEST_METHOD'} eq 'POST' )
	{
	   read(STDIN,$buf,$ENV{'CONTENT_LENGTH'});
	   @str = split(/&/,$buf);
	}
else
	{
	   @str = split(/&/,$ENV{'QUERY_STRING'});
	}

$i=0;

while ( $str[$i] ne '' )
	{
	   ($name,$value) = split(/=/,$str[$i]);
	   $name =~ tr/+/ /;
	   $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
	   $name =~ tr/a-z/A-Z/;

	   $value =~ tr/+/ /;
	   $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
	   $i++;{"$name"} = $value;
	}

print "Location: $parm{'GOTO'}\n\n";


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

Date: 28 Jul 1997 11:48:28 GMT
From: lparillo@newshost.li.net (Parillo)
Subject: Re: Perl for win 95 ?
Message-Id: <5ri0uc$g0d$2@news01.li.net>

I have tried, and I can

lparillo at suffolk dot lib dot ny dot us

Tom Phoenix (rootbeer@teleport.com) wrote:
: On Sun, 20 Jul 1997, Kazys Jocionis wrote:

: > Today I have found Perl for win 32 on the Net. 
: > 
: > Can I run it on my PC?

: You'll never know until you try. :-)  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, 28 Jul 1997 06:06:17 GMT
From: a@123.com
Subject: Question: How to execute a program and read results
Message-Id: <5rhcn3$jjp@daffy.pageplus.com>

This may seem extremely easy and straightforward, and is probably documented 
in a number of perl books I have (in PA), but I'm in NE and all I have is the 
2nd edition camel book and the solution has escaped me.

What I'd like to do is something that should be fairly easy. For example, 
execute the command "/usr/bin/finger username" and I want to be able to get 
the output of that command.

Can someone help me out here?  Thanks

Greg


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

Date: Mon, 28 Jul 1997 06:10:58 GMT
From: a@123.com
Subject: Question: How to use sockets
Message-Id: <5rhcvs$jt7@daffy.pageplus.com>

I tried some sample programs from the perl camel book but they don't work for 
what I want to do.

For example, let's say I was writing a 'finger' client in perl. 

I would want to connect to the server's finger port and submit a request to 
the finger daemon and read the results, yet when I tried the example, I don't 
think my client switched to the new port where the answer was to be sent back, 
it stayed put on the initial port.

Would it be possible for someone to point me to a resource that shows how to 
use Sockets for this type of example? Preferably something with non-blocking 
calls or timeouts so you don't end up waiting forever in case a daemon doesn't 
respond. A sample program would be even better. Any help that anyone can 
provide would be greatly appreciated.

Thanks
Greg


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

Date: 28 Jul 1997 06:48:52 GMT
From: Chizl<chizl@bigfoot.com>
Subject: Source Code I have and Need!
Message-Id: <5rhfck$po2@news0-alterdial.uu.net>

All the source code you need if not tell us what you need help on and we
can find it for you..  We have two going on three conveiant places of Source Code
http://www.karland.com/               -  Missouri, USA
http://www.sourcesite.simplenet.com/  -  California, USA
And soon one in BellAir, South Africa

For Keywords on Newsgroup Standard We provide:
ActiveX Source, Assembler Source, Basic Source, Bison Source, C Source, C++ Source, CGI Source, Clipper Source, Cobol Source, Delphi Source, DontKnow Source, Embedded Source, Fortran Source, Game Source, HTML Source, Java Source, JavaScript Source, LISP Source, Pascal Source, PERL Source, Power Basic Source, QBasic Source, Script Source, VBScript Source, Visual Age Source, Visual Basic Source, Visual dBase Source, Visual Smalltalk Source, Visual Works Source, V-OS-2 Source, V-Win Source,  and Visual Objects Source

We Need:
Ada Source; Modal2/3 Source; More Embedded Source; More Fortran Source;

We currently have a page on DCOM for Dummies..
Soon we will provide help on MFC, DCOM, COM, Active X, and ATL
We will also have a book section on great book on these subjects too..
Post a resume here!
Post a job opening here too!

All of this is FREE to you..
-- 
L8r,
Chiz
chizl@karland.com
Karland International
http://www.karland.com/

The Source Site
http://www.karland.com/code/
The ONLY site for All platforms and all language source code in one place.
Take code and give code for FREE!


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

Date: Mon, 28 Jul 1997 12:08:48 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <Pine.A41.3.95a.970728135852.111678C-100000@sp049>

On 28 Jul 1997, John Bokma wrote:

 ...
> Providers don't teach people
> to go to news.answers before starting to use USENET.

Too bad.  Before it became September all year round, newsreaders came
with news.announce.newusers pre-subscribed, and newbies were expected to
do their homework.  Now it seems we are expected to re-negotiate the
terms of engagement every day, instead of concentrating on the topic.

> See the example above. 

Sometimes people make mistakes.  Nothing that you or I can say will
change that, so live with it.  I don't see how such individual mistakes
discredit the general principle. 

> The FAQ is (and will) never be complete.

Who suggested that such a thing could be possible or even desirable?

It only reinforces the point that if a quality answer is ready and
waiting in the relevant FAQ, it's foolish to ask for (and
counterproductive to give) a random off-the-top-of-head answer here. 




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

Date: 28 Jul 1997 11:29:56 GMT
From: "John Bokma" <jbokma@caiw.nl>
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <01bc9b49$aad90b00$d60ab2c2@tschai>



Alan J. Flavell <flavell@mail.cern.ch> wrote in article
<Pine.A41.3.95a.970726172806.36154E-100000@sp049>...
> On 25 Jul 1997, John Bokma wrote:
> 
> > Some postings use the FAQ like some holy bible, 
> 
> Yeah, well if someone asks a question that's answered in the Bible,
> would you prefer to be pointed to the answer that's there, or given
an
> answer that somebody had made up?

But like the Bible, the FAQ is often used in cases it should not.
I can remember at least one posting (not long ago) about extracting
fields from
a csv file. Although the original poster stated that the solution in
the FAQ didn't work
is this special case, one of the answered posted was something like:
Read the FAQ.
(which really pissed him off 8-). What I mean, some people start
yelling "Read the FAQ"
like some mantra even before they have read the whole posing..

> FAQs have normally been reviewed by other practitioners, and
represent
> the considered opinion of some serious contributors.  Devising a
one-off
> answer to such a question, without any mention of the FAQ, is
rarely
> helpful.  When newbies finally get around to reading the FAQs they
find
> answers to many questions that they never realised they needed to
ask. 
> The sooner that happens, the better.  For them and for everyone
else.

I agree, but some newbies are not connected that long that they know
what FAQ means
or where and how to find it. So "Read the FAQ" is most of the times
an incomplete and incomprehensable (hmm, hope I spelled that one
right) answer. Providers don't teach people
to go to news.answers before starting to use USENET.

> 
> > and don't leave any room
> > for thinking together about a solution.
> 
> Nonsense.  It's only by getting the standard questions out of the
way
> that room is made for thinking about solutions to more interesting
> problems.  

See the example above. Some problems seems to be in the FAQ, but
aren't. The FAQ is
(and will) never be complete.

John


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

Need a Freelance Software Developer (MSc)? (CGI, Perl, Java, C, C++)

http://www.caiw.nl/~jbokma [Java demo's, Curriculum Vitae and
more...]

email: jbokma@caiw.nl  phone: +31 10 4291827



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

Date: Mon, 28 Jul 1997 08:08:12 -0400
From: "Jeffrey J. Barrett" <gt5146c@acmez.gatech.edu>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: turning off "<variable name> used only once" warning
Message-Id: <Pine.SOL.3.95.970728075432.6453A-100000@acmez.gatech.edu>

On Thu, 24 Jul 1997, Tom Phoenix wrote:

	Thanks to everyone for the replies.  Let me be a little more
specific as to where this is occuring.  I am using the library routine
Getopt::Std to allow for easy command line parsing.  My script can take
one flag, an 'f'.  
	In case you aren't familiar with it, the way this library is used
is with a 'getopt( 'f' )'.  If an 'f' flag was given to the script, this
call will create a variable called '$opt_f' and set its value to '1'.  I
only need to access this variable once, in an if statement to see if it
exists/is set to 1. 
	So, I could easily do a use vars($opt_f) but thats really a bad
kludge.  What if my script has a possible 7 flags, am I supposed to pass
each one to the use vars statement?  A 'my' statement is kind of bad for
the same reason.  This library is nice because it only creates the
variables if the switches were passed, it defeats that convenience if I
have to create all those variables.  Yes I could add an extra access to
eliminate the warning, like setting the variable to itself, this is not
what I would call a fix. 
	Is there any other way to do this? 

+jeff




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

Date: 28 Jul 1997 09:44:22 -0400
From: Clark Dorman <clark@s3i.com>
Subject: Re: where is FAQ, how to use $ENV
Message-Id: <doh7nb8ax.fsf@s3i.com>


Jay Eckles <eckje@rhodes.edu> writes:
> Second, I'm just now learning perl (have experience with C) and am
> trying to experiment a bit with CGI using Perl.  I know there is a
> module called ENV or something like that that deals with environment
> variables...how do I use it?  

ENV is a hash (associative array) that contains your environment variables.
To see what is in there, try doing the following (after changing the first
line to your location of perl if necessary.  Do a "which perl" at the command
line) from the perlfunc (keys) page:

#!/usr/bin/perl -w

foreach $envkey ( sort( keys(%ENV))) {
   print "\t($envkey) => ($ENV{ $envkey }) \n";
}


-- 
Clark Dorman				"Evolution is cleverer than you are."
http://cns-web.bu.edu/pub/dorman/D.html                -Francis Crick


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

Date: Mon, 28 Jul 1997 09:47:17 -0400
From: "James J. Heck" <jheck@merck.com>
Subject: Re: XS: file handles
Message-Id: <33DCA2E5.167E@merck.com>

AJS,

> You want to open(STDOUT,">$file"), which will leave the C program that
> you run talking to file-descriptor 1 (stdout) which will be whatever
> you want.

	when I do:
$file = "stdout";
open(OFILE,">$file");
&klib::k_ffd_writmol(OFILE, $MOLE);

	I just end up with a file called "stdout" and not getting my output
sent to STDOUT.  
	Like I said, I would like to try to leave the C function as is.  If I
can get this to work with out writting a C wrapper for the C function
call to make sure it goes to the true STDOUT or comes from the true
STDIN.  

	Thanks for your help.
James

--------------------
James J. Heck
jheck@acm.org
http://www.bucknell.edu/~jheck


       The contents of this message express only the sender's opinion.
       This message does not necessarily reflect the policy or views of
       my employer, Merck & Co., Inc.  All responsibility for the statements
       made in this Usenet posting resides solely and completely with the
       sender.


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

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

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