[11640] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5240 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 27 17:02:39 1999

Date: Sat, 27 Mar 99 14:00:17 -0800
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, 27 Mar 1999     Volume: 8 Number: 5240

Today's topics:
        a problem.. (pyjamas)
    Re: Format page length <rick.delaney@home.com>
        Help - Perl the basics <stephen@dishon.freeserve.co.uk>
    Re: Help - Perl the basics <jdf@pobox.com>
    Re: Help - Perl the basics (Bob Trieger)
        HELP! Can't get system() to work in DOS/Win3 <underdog@erols.com>
    Re: Input Password <hlee@ccserv2.ee.ntu.edu.tw>
        internal server error <larsplessmann@gmx.de>
        IO::Handle dumping core? (Dop Ganger)
        Is this secure? (Marc Haber)
        Need automatic forwarding perl script <bernardino.spensieri@utoronto.ca>
    Re: Need automatic forwarding perl script <bubba@inorbit.com>
    Re: Need automatic forwarding perl script <debot@xs4all.nl>
        Newbie ques., clearing an array (Neil Cherry)
    Re: Newbie ques., clearing an array <rick.delaney@home.com>
        Paging, PCS software for Perl (Bob Clauser)
        Perl script goes zombie, help! (Vanja Bertalan)
    Re: Quicksort won't work <aqumsieh@matrox.com>
        Split with + , but no %2B <debot@xs4all.nl>
        Webspace? editor@dvar.com
    Re: Webspace? <rick.delaney@home.com>
    Re: Writing isn't working, and the mode is set, Help! <jdf@pobox.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 27 Mar 1999 17:35:19 GMT
From: pyjamas@who.net.no.spamheheahha (pyjamas)
Subject: a problem..
Message-Id: <7dj4uc$nmm@ustsu10.ust.hk>

whenever i run my perl...
it shows this to me...

----
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        LC_CTYPE = "iso_8859_1",
        LANG = "unset"
    are supported and installed on your system.
---

how to solve this?
thx a lot.


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

Date: Sat, 27 Mar 1999 21:03:23 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Format page length
Message-Id: <36FD4998.C12AA031@home.com>

[posted & mailed]

Thomas Wade Vaughan wrote:
> 
> I am using the $= variable to set the page length in a formatted 
> output to the screen and the $= variable allows me to change the page 
> length. When I change the output to a file the variable seems to have 
> no effect. Is there a reason the the $= variable doesn't work the same 
> way in file output as in screen output and how might I change the page 
> length to a file?

There is no diffence in the behaviour.  Whatever you are using to verify
page breaks inside the file is faulty.  Try altering the page break
string, $^L, to something that will stand out like "PAGE BREAK HERE!!\n"
and then look at your file.

If that doesn't show then please post a small snippet of code that
duplicates this problem.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 27 Mar 1999 17:21:00 -0000
From: "Stephen Dishon" <stephen@dishon.freeserve.co.uk>
Subject: Help - Perl the basics
Message-Id: <7dj42f$do5$1@news6.svr.pol.co.uk>

I'm at a loss.

I've programmed in Pascal and lately Java and I am trying to learn Perl. I,
however, am having problems. I do have a book "Perl5 Complete" which covers
every operating system known to man...thus is difficult to weed out the
relevant information. So a few simple questions.

Using Windows 95

1) Is there a specific package to enter the code in or will notepad
do...saving the code as <filename.p>

2) Must I have a C compiler to compile Perl in Win95.

Answers to these question would be most appeciated, with more questions to
follow.

--
Stephen Dishon
Edinburgh,
stephen@dishon.freeserve.co.uk
http://www.dishon.freeserve.co.uk
http://www.stga.co.uk




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

Date: 27 Mar 1999 13:24:14 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "Stephen Dishon" <stephen@dishon.freeserve.co.uk>
Subject: Re: Help - Perl the basics
Message-Id: <m3lngi7pv5.fsf@joshua.panix.com>

"Stephen Dishon" <stephen@dishon.freeserve.co.uk> writes:

> I've programmed in Pascal and lately Java and I am trying to learn Perl. I,
> however, am having problems. I do have a book "Perl5 Complete" which covers
> every operating system known to man...thus is difficult to weed out the
> relevant information. So a few simple questions.
> 
> Using Windows 95

Halt!  Type no further.  Lay down a few quid for _Learning Perl on
Win32 Systems_, the O'Reilly "gecko" book.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Sat, 27 Mar 1999 21:03:31 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Help - Perl the basics
Message-Id: <7djh57$ml3$2@holly.prod.itd.earthlink.net>

<stephen@dishon.freeserve.co.uk> wrote:
>I'm at a loss.
>
>I've programmed in Pascal and lately Java and I am trying to learn Perl. I,
>however, am having problems. I do have a book "Perl5 Complete" which covers
>every operating system known to man...thus is difficult to weed out the
>relevant information. So a few simple questions.

Perl operates basically the same under Linux and Win32. I port scripts back 
and forth all the time and if I have to make changes it is usually something 
simple like the directory paths.

>Using Windows 95
>
>1) Is there a specific package to enter the code in or will notepad
>do...saving the code as <filename.p>

Any text editor will do and there are even a couple of IDEs which you can find 
on the http://www.perl.com website.

>2) Must I have a C compiler to compile Perl in Win95.

Nope. You can go through the headaches of trying to compile the source or you 
can download the binary at http://www.perl.com or http://www.activestate.com

>Answers to these question would be most appeciated, with more questions to
>follow.

Warning: If you don't do your own research with the docs, especially the FAQs 
before asking your questions, you may get your head bitten off.


Good luck

Bob Trieger
sowmaster@juicepigs.com       



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

Date: Sat, 27 Mar 1999 10:58:31 -0500
From: "Dave Abramowitz" <underdog@erols.com>
Subject: HELP! Can't get system() to work in DOS/Win3
Message-Id: <7divbe$8b9$1@winter.news.rcn.net>

I'm sitting here at a "customer" site, trying to get simple system commands
to work under DOS, specifically system("pause") and system("cls"). They
don't work. I've installed the OS/2 port as directed and the sh_dos and set
the PERL_SH_DIR appropriately. If I do something like: system("perl -v") it
works fine, but I can't get the other commands to work. If anyone's out
there now (11:01 EST) and can get back to me with some possible resolutions,
I'd be your buddy for life. These work fine under NT of course....

- Dave




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

Date: 27 Mar 1999 16:50:39 GMT
From: Huang Lee <hlee@ccserv2.ee.ntu.edu.tw>
Subject: Re: Input Password
Message-Id: <7dj28v$132$1@gemini.ntu.edu.tw>

Greg Bacon <gbacon@itsc.uah.edu> wrote:
> In article <7ddshe$596$2@gemini.ntu.edu.tw>,
> 	Huang Lee <hlee@ccserv2.ee.ntu.edu.tw> writes:
> : My problem is that the program need users to input password,
> : but when users input password,I can not "hide" the password for users.
> : Users can see their own password when they key-in password.
> If you're using the Telnet protocol, you (the server) can tell the
> client that you'll worry about echoing characters.  Assuming that the
> client agrees, you simply refrain from echoing characters to the client
> while receiving a password.
> Have a look at RFC 857.  You might also find the Net::Telnet module
> useful in handling Telnet option negotiation.
Thanks. ^^ I have solved the problem by "printf("%c%c%c",0xff,0xfb,0x01);"

but now,if I want to add another function like "Press any key to stop".
I mean I can input "one key" without ENTER.
and the program will not stop.until I type something....
what should I do....(Under telnet mode,I am server on unix)
Thanks..... 

-- 
Huang Lee , College Student
Department of Electrical Engineering,
National Taiwan University.
HomePage URL : http://www.ee.ntu.edu.tw/~hlee/


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

Date: 27 Mar 1999 20:44:20 GMT
From: Lars Plessmann <larsplessmann@gmx.de>
Subject: internal server error
Message-Id: <36FD43F8.D6E954A9@gmx.de>

I create my perl scripts in windows. The are running without any problem
on my Sambar Server 4.1
When I trie to execute them on Linux, there is an error message
"internal server error". What's wrong with my perl script? I think I
changed the attributes in a correct way (chmod 777 file.pl)

Please, help me!

ps: If you've got an answer, please mail it to this forum and to me:
larsplessmann@gmx.de
thx!




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

Date: Sat, 27 Mar 1999 17:03:02 GMT
From: spamtrap@fop.ns.ca (Dop Ganger)
Subject: IO::Handle dumping core?
Message-Id: <slrn7fq3q1.790.spamtrap@fop.foppity.org>

Perl is dumping core whenever IO::Handle is called, and I can't figure out
why; could anyone out there give me some pointers? I've completely
reinstalled perl from scratch, so I'm guessing it's a lib somewhere that's
got corrupted. Can anyone give me any pointers? Here's a sample of what I'm
getting:

fop:/rc5/proxy# perl -d -MCPAN -e shell

Loading DB routines from perl5db.pl version 1.0401
Emacs support available.

Enter h or `h h' for help.

Signal SEGV at /usr/lib/perl5/5.00502/i586-linux/IO/Seekable.pm line 50
        IO::Seekable::BEGIN() called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
        eval {...} called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
        require IO/Seekable.pm called at /usr/lib/perl5/5.00502/i586-linux/IO/File.pm line 111
        IO::File::BEGIN() called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
        eval {...} called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
        require IO/File.pm called at /usr/lib/perl5/5.00502/FileHandle.pm line 9
        require FileHandle.pm called at /usr/lib/perl5/5.00502/CPAN.pm line 26
        CPAN::BEGIN() called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
        eval {...} called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
        require CPAN.pm called at -e line 0
        main::BEGIN() called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
        eval {...} called at /usr/lib/perl5/5.00502/i586-linux/DynaLoader.pm line 0
IOT trap/Abort (core dumped)

Line 50 of Seekable.pm is:

use IO::Handle qw(SEEK_SET SEEK_CUR SEEK_END);

Any pointers would be much appreciated :-)



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

Date: Sat, 27 Mar 1999 17:24:22 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Is this secure?
Message-Id: <7dj487$2be$2@news.rz.uni-karlsruhe.de>

Hi!

Most flavours of Unix don't allow suid shell scripts for security
reasons. This is generally a good thing, but can be annoying if you
have a script running as root and want to execute parts of it as
non-root. Currently, this cannot be done without doing a "su -
username otherscript", which does the non-root part in a separate
process and clutters up the authentication log with su entries.

I have written a small utility program to honor the suid and sgid bits
on arbitrary executables if and only if:

- the utility itself is called by root
- the utility itself is neither suid nor sgid.

I am led to believe this is secure because if we're root, we'd be able
to do a su anyway.

Here is my source code:

|#!/usr/bin/perl -wT
|
|use strict;
|use English;
|use File::stat;
|
|$ENV{PATH}="/usr/bin";
|
|if( -u $0 || -g _ )
|{
|    die "this won't run suid or sgid\n";
|}
|
|if( $UID!=$EUID || $GID!=$EGID )
|{
|    die "funny things happening with euid and egid\n";
|}
|
|if( $UID!=0 )
|{
|    die "this will only run as root\n";
|}
|
|foreach( @ARGV )
|{
|    if (/^([-\@\w.\/]+)$/)
|    {
|        $_ = $1;                     # $data now untainted
|    }
|    else
|    {
|        die "use sane input please: $_ considered bad.";
|    }
|}
|
|my $filename = shift;
|my @params = @ARGV;
|
|#open FH, "<$filename" or die "can't open $filename: $!";
|
|my $inode = stat($filename) or die "can't stat $filename: $!";
|
|if( -u _ )
|{
|    $UID = $inode->uid or die "can't set uid to $inode->uid: $!";
|    $EUID = $inode->uid or die "can't set euid to $inode->uid: $!";
|}
|
|if( -g _ )
|{
|    $GID = $inode->gid or die "can't set gid to $inode->gid: $!";
|    $EGID = $inode->gid or die "can't set egid to $inode->gid: $!";
|}
|
|exec( "$filename @params" ) or die "can't exec $filename @params: $!";

This source code is subject to a race condition since stat and exec
are non-atomic and somebody could exchange the executable while we are
running. Is there a mechanism in perl to stat or execute code from an
open file handle? That way, I could open the file, stat, do my checks
and then execute the guaranteed same file.

Did I do something incredibly stupid by writing this code? I'd like to
know about any security implications.

Any comments will be appreciated.

Greetings
Marc

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


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

Date: Sat, 27 Mar 1999 18:09:43 GMT
From: Beny Spensieri <bernardino.spensieri@utoronto.ca>
Subject: Need automatic forwarding perl script
Message-Id: <36FD1EE7.D2C0F627@utoronto.ca>

I need a script that will forward a user to another page after a
few seconds.  This is commonly used to send web serfers to the
new location of a web page that has moved.

Please e-mail your responses to me, thanks.

Beny
-- 
	 ___________  "I have summoned you here for a purpose..."
       //     I     \\   "Nobody summons Megatron!"              
     //       I       \\    "Then it pleases me to be the
first..."
   //       /UUU\       \\
  II      /UUUUUUU\      II
 II======]U>     <U[======II                 o
  II      \UUUUUUU/      II                 /|\\
   \\       \UUU/       //                  / \
     \\       I       //
       \\_____I_____//


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

Date: Sat, 27 Mar 1999 12:31:28 -0800
From: "KJS" <bubba@inorbit.com>
Subject: Re: Need automatic forwarding perl script
Message-Id: <7djf3n$9qj$1@news.NERO.NET>

Have you tried

print"Location: http://PAGE HERE

Beny Spensieri wrote in message <36FD1EE7.D2C0F627@utoronto.ca>...
>I need a script that will forward a user to another page after a
>few seconds.  This is commonly used to send web serfers to the
>new location of a web page that has moved.
>
>Please e-mail your responses to me, thanks.
>
>Beny
>--
> ___________  "I have summoned you here for a purpose..."
>       //     I     \\   "Nobody summons Megatron!"
>     //       I       \\    "Then it pleases me to be the
>first..."
>   //       /UUU\       \\
>  II      /UUUUUUU\      II
> II======]U>     <U[======II                 o
>  II      \UUUUUUU/      II                 /|\\
>   \\       \UUU/       //                  / \
>     \\       I       //
>       \\_____I_____//




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

Date: Sat, 27 Mar 1999 22:05:09 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Re: Need automatic forwarding perl script
Message-Id: <36FD4805.E2633760@xs4all.nl>

This is not right. It must be:

print "Location: http://mypage.com\n\n";

(You forgot the double "\n" and the end (";)

KJS wrote:

> Have you tried
>
> print"Location: http://PAGE HERE
>
> Beny Spensieri wrote in message <36FD1EE7.D2C0F627@utoronto.ca>...
> >I need a script that will forward a user to another page after a
> >few seconds.  This is commonly used to send web serfers to the
> >new location of a web page that has moved.
> >
> >Please e-mail your responses to me, thanks.
> >
> >Beny
> >--
> > ___________  "I have summoned you here for a purpose..."
> >       //     I     \\   "Nobody summons Megatron!"
> >     //       I       \\    "Then it pleases me to be the
> >first..."
> >   //       /UUU\       \\
> >  II      /UUUUUUU\      II
> > II======]U>     <U[======II                 o
> >  II      \UUUUUUU/      II                 /|\\
> >   \\       \UUU/       //                  / \
> >     \\       I       //
> >       \\_____I_____//



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

Date: Sat, 27 Mar 1999 16:13:03 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: Newbie ques., clearing an array
Message-Id: <slrn7fq0vk.jr.njc@dmc.uucp>

I have 2 books on Perl and I find the arrays the most confusing part.

Actually I have 2 questions:

1) How does one clear an array after it's bee filled?

2) How does one create a multi dimension array or an array of structures?

-- 
Linux Home Automation           Neil Cherry             ncherry@home.net
http://members.home.net/ncherry                         (Text only)
http://meltingpot.fortunecity.com/lightsey/52           (Graphics GB)
http://www2.cybercities.com/~linuxha/			(Graphics US)


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

Date: Sat, 27 Mar 1999 21:23:24 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Newbie ques., clearing an array
Message-Id: <36FD4E49.67546E5A@home.com>

[posted & mailed]

Neil Cherry wrote:
> 
> I have 2 books on Perl and I find the arrays the most confusing part.
> 
> Actually I have 2 questions:
> 
> 1) How does one clear an array after it's bee filled?

perldoc perldata

I'll quote this one to get you started:

    You can truncate an array down to nothing by assigning the null list 
    () to it. The following are equivalent: 

    @whatever = ();
    $#whatever = -1;

> 2) How does one create a multi dimension array or an array of 
> structures?

perldoc perldsc
perldoc perllol
perldoc perlref

I'm not quoting these.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 27 Mar 1999 13:03:34 -0600
From: RClauser@crosscom.com (Bob Clauser)
Subject: Paging, PCS software for Perl
Message-Id: <RClauser.105.00EA3960@crosscom.com>
Keywords: perl messaging solutions, web paging, email paging, unix paging software, NT paging software

Cross Comm offers a number of paging software solutions for perl users and 
developers.

The most popular package is Hiplink, which loads onto your Unix/NT 
system much like a print driver, allowing any application to effect paging 
from across the entire network.  There are all sorts of functionality you can 
implement with one HipLink package too: email paging, web paging, network 
management notification as well as help desk interfaces.  

HipLink is a cost-effective production-grade solution that makes sense for 
aall sorts of fun and production environments.

Contact me of visit www.crosscom.com for a free demo or to see how HipLink can 
help you today.

Rc


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

Date: Sat, 27 Mar 1999 20:59:43 +0100
From: vanja@igp.hr (Vanja Bertalan)
Subject: Perl script goes zombie, help!
Message-Id: <MPG.116756e37e6568bb989685@news.tel.hr>

What I'm trying to do is web based interface 4 my intranet users to be 
able to dial-up the internet.
After all the testing which goes well I need to fire something like "ifup 
ppp0" for example. The command executes but the program becomes zombie, 
and occasionally kills apache...which is not good, right.
After firing "ifup..." I need to run additionall tests on ifconfig and ps 
to figure out when is the connection established but that's out of 
question because you can't talk to zombie :(
I tried with system, exec, backticks --- same result.
If you need additionall info, just name it, I'm out of ideas.
-- 
-----
Vanja Bertalan
e-mail: vanja@igp.hr
web:    www.igp.hr/vanja


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

Date: Sat, 27 Mar 1999 15:45:04 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Quicksort won't work
Message-Id: <x3yn20yvf00.fsf@tigre.matrox.com>


Philip Newton <Philip.Newton@datenrevision.de> writes:

> >                 if(@list[$r]<@list[$r-1])
> 
> $l, not l -- you can't leave off the "funny character" in Perl.

Hmmmm.. this seems like the number one (1) to me .. no the letter 'el'
(l).

I should change my newsreader's font!



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

Date: Sat, 27 Mar 1999 22:02:54 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Split with + , but no %2B
Message-Id: <36FD477E.D90081AD@xs4all.nl>

Is there anyway to split a string with + while %2B stays ?
Thanks,





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

Date: Sat, 27 Mar 1999 15:18:00 +0100
From: editor@dvar.com
Subject: Webspace?
Message-Id: <36FCE898.7C3E@dvar.com>

Hi everybody,

Who knows what is reguired (software & expenses) to setup a server with 
18 giga harddisk.

I know nothing so all info on this are welcome.

Thanking you in anticipation

Regards
Azad


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

Date: Sat, 27 Mar 1999 21:25:56 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Webspace?
Message-Id: <36FD4EE2.DD9FEE10@home.com>

[posted & mailed]

editor@dvar.com wrote:
> 
> Hi everybody,

Hi, Dr. Nick!

> Who knows what is reguired (software & expenses) to setup a server 
> with 18 giga harddisk.

Not me.

> I know nothing so all info on this are welcome.

The most useful info I can give you is that you're asking in the wrong
place.  This is not even remotely a Perl question.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: 27 Mar 1999 11:08:21 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "William Flanagan" <wflanagan@msn.com>
Subject: Re: Writing isn't working, and the mode is set, Help!
Message-Id: <m3ogle7w5m.fsf@joshua.panix.com>

"William Flanagan" <wflanagan@msn.com> writes:

> # This is my first attempt at writing a program that will convert my Notes
> database to a comma delimited

Your news client is wrapping lines, which breaks perl code.

> if ($#ARGV !=1) {
>     die "Structured Text to Comma Delimiter, 1999 William Flanagan\n Usage:
> $0 inputfile outputfile\n";
>     }

The canonical way to write a filter in perl is to read from the
implicit ARGV filehandle like so

  while(<>)

and to write to STDOUT.  All of the argument checking you're doing is
just extra work that obscures the meaning of your code.  If you write
your program like this

   while (<>) {
      # do something with $_
      # print something
   }

then you can invoke it like this

   perl myprog.pl infile.txt > outfile.csv

or even have it work on the output of another program

   dir | myprog.pl

> $mode='+<';
> open(INPUT,"+<$infile") ||
>     die "Can't open $infile successfully, ensure $infile is plain text $!";

If $infile is indeed simply input, why open it read/write?

>         print STDERR "replace, append, or exit? ";
>         $ans = getc(STDIN);

The reason to avoid stuff like this is that it makes your program less
generally useful, in that you can no longer read STDIN for actual
data.  If you need an interactive program, perhaps you might consider
writing a wrapper program that then runs the actual text filter.

If you want to append to the output file, then use then use the shell
to say so:

   perl myprog.pl infile.txt >> outfile.csv

>     if ($ans eq 'e') {exit}

What about uppercase letters?

   if ($ans =~ /e/i)

>     $foundfield='n';
>     for ( $a=0; $a <= $ccount; $a++) {
>          if ($columnlist[$a][1] eq $fieldname) {
>          $foundfield='Y';
>          last; }
>     }
>     if ($foundfield eq 'n') {
>         $columnlist[$ccount] = ["$ccount", "$fieldname"];
>         print STDOUT "Adding $fieldname to record list.\n";

Ack!  Again, this pollutes a potentially useful output stream.  Use
STDERR for messages.

I absolutely cannot figure out what you're doing here.  I'm *guessing*
that you really want to use a hash, though for what, I don't know!

> while ($line = <INPUT>) {
>     ($fieldname, $fieldvalue) = split(":", $line);

Oh gosh, you're reading the whole input file twice.  Now I see why
you're explicitly asking for a file name.

Perhaps if I understood better exactly what you're doing, I'd
understand why it's necessary to read the file twice.

But I'm dubious.

>     close INPUT,OUTPUT;

close() does not take a list of filehandles.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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