[10948] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4549 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 4 23:17:28 1999

Date: Mon, 4 Jan 99 20: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           Mon, 4 Jan 1999     Volume: 8 Number: 4549

Today's topics:
    Re: a problem! (Matthew Bafford)
    Re: background server (Martien Verbruggen)
    Re: change perl script process name witthawat@my-dejanews.com
    Re: Correct password, but still returns error (Martien Verbruggen)
    Re: Correct password, but still returns error (Groovy94)
    Re: Correct password, but still returns error (Martien Verbruggen)
    Re: Correct password, but still returns error (Larry Rosler)
    Re: Correct password, but still returns error (Groovy94)
    Re: Correct password, but still returns error <chatmaster@c-zone.net>
        Dynamic gifs on the fly <chaimwerz@yahoo.com>
    Re: hash of hashes <netog@ziplink.net>
        Help - replacing text in a file <dales@enhanced-performance.com>
    Re: Help - replacing text in a file (Alastair)
    Re: Help - replacing text in a file (Groovy94)
    Re: Help - replacing text in a file (Martien Verbruggen)
    Re: Help - replacing text in a file <eugene@verticalnet.com>
    Re: Help Wanted <chatmaster@c-zone.net>
        How to Protect sound files in a webpage????? (jm)
    Re: How to Protect sound files in a webpage????? (Martien Verbruggen)
        How to redistribute ActiveState's Perl <tpg@cls.uob.com.sg>
        HP-UX 10.20 aCC / Config script fails on compiler check <tonyw@donet.com>
    Re: Perl file handling <tchrist@mox.perl.com>
    Re: Reading comma delimited files (Simon Fairall)
    Re: Retrospective on comp.lang.perl.moderated? (Mark-Jason Dominus)
        Sendmail 8.9.1 makemap hash format and Perl <apollock@bit.net.au>
        Sync time script??? <bobm@cunix.com>
    Re: Sync time script??? <webmaster@somewhere.com>
    Re: variables in templates? (Tad McClellan)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 4 Jan 1999 21:37:51 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: a problem!
Message-Id: <MPG.10fb450c4f5363df989775@news.scescape.net>

In article <36914F7A.936B5DF8@ngb.se>, staffan@ngb.se pounded in the 
following:
=> print ANOTHERFILE @paragraphs[0];

print ANOTHERFILE $paragraphs[0];

--Matthew


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

Date: Tue, 05 Jan 1999 01:12:07 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: background server
Message-Id: <HFdk2.44$Mw1.1154@nsw.nnrp.telstra.net>

In article <76rmng$nci$1@leopard.it.wsu.edu>,
	ehammerv@tricity.wsu.edu (Eric Hammervold) writes:

> I need some information on generating background servers for windows
> NT.  Specificly is it possible for a perl program to be running as a
> server program while nobody is loged into the machine?  If so, how
> do you do it?

I believe those things are called 'services' on NT. There's a module
Win32::Servic available from CPAN (http://www.perl.com/CPAN/) which
probably does what you want.

You should also check out www.activestate.com for Win32 specific perl stuff.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | The gene pool could use a little
Commercial Dynamics Pty. Ltd.       | chlorine.
NSW, Australia                      | 


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

Date: Tue, 05 Jan 1999 02:10:06 GMT
From: witthawat@my-dejanews.com
Subject: Re: change perl script process name
Message-Id: <76rs9t$1fq$1@nnrp1.dejanews.com>

In article <3690F4AE.2A716D8B@yournews.nl>,
  "Bas A. Schulte" <bas@yournews.nl> wrote:
> Hi,
>
> > How can i change "/usr/local/bin/perl abc" to other process name such as
> > "bcd"?
>
> $0 = 'bcd';
>
> Not sure how portable this is; it works on our Linux boxes, but does not
> seem to work on our HP/UX 10.20's.
>
> Ciao.

My system is solaris 2.6. Setting $0 = 'bcd' didn't work too.
Anyone have any other way to solve this?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 05 Jan 1999 01:09:29 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Correct password, but still returns error
Message-Id: <dDdk2.43$Mw1.1154@nsw.nnrp.telstra.net>

In article <19990104194701.21163.00007708@ng95.aol.com>,
	groovy94@aol.com (Groovy94) writes:

> $crypted_password = crypt($INPUT{'password'}, aa);

This is your problem. You can't just use a salt that you pick. You'll
have to use the same one that was used back when the original was
encrypted. The first two characters of the encrypted password are its
salt. You could consider using the example from the crypt
documentation:

# perldoc -f crypt
[snip]
    $pwd = (getpwuid($<))[1];
    $salt = substr($pwd, 0, 2);
[snip]
	    if (crypt($word, $salt) ne $pwd) {
        die "Sorry...\n";
    } else {
        print "ok\n";
    }
[snip]

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | The world is complex; sendmail.cf
Commercial Dynamics Pty. Ltd.       | reflects this.
NSW, Australia                      | 


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

Date: 5 Jan 1999 01:14:46 GMT
From: groovy94@aol.com (Groovy94)
Subject: Re: Correct password, but still returns error
Message-Id: <19990104201446.21157.00007465@ng95.aol.com>

I should have pointed out that I did use the same salt, aa, on both passwords.
I checked to make sure that $crypted_password and $password where exactly the
same. I printed out both in the error message, and the results showed up as
them being identical.
Regards,
Gil Hildebrand, Jr.
Dynamic Scripts

Email: groovy94@aol.com
ICQ UIN: 16678754


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

Date: Tue, 05 Jan 1999 01:29:36 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Correct password, but still returns error
Message-Id: <4Wdk2.53$Mw1.1154@nsw.nnrp.telstra.net>

In article <19990104201446.21157.00007465@ng95.aol.com>,
	groovy94@aol.com (Groovy94) writes:

> I should have pointed out that I did use the same salt, aa, on both
> passwords.  I checked to make sure that $crypted_password and
> $password where exactly the same. I printed out both in the error
> message, and the results showed up as them being identical.

Ok, back to the original code then :)

One thing that comes to mind is that you may have line terminators
("\n") in either of the two password strings. Have you tried chomp-ing
them? When you print out their values, do you use something like:

print "|$crypted_password| - |$password|\n";

to see whether there is whitespace in them?

I can't really think of much else at this point..

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | In the fight between you and the world,
Commercial Dynamics Pty. Ltd.       | back the world - Franz Kafka
NSW, Australia                      | 


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

Date: Mon, 4 Jan 1999 17:29:41 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Correct password, but still returns error
Message-Id: <MPG.10fb0adf6f520f7f9898f5@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <19990104194701.21163.00007708@ng95.aol.com> on 5 Jan 1999 
00:47:01 GMT, Groovy94 <groovy94@aol.com> says...
 ...
> 	open(RESELLERS,"<resellers.dat") || &error("Cannot read from resellers.dat");
> 	@resellers=<RESELLERS>;
> 	close(RESELLERS);
> 
> 	foreach $reseller (@resellers) {
> 		($id,$first_name,$last_name,$address,$city,$state,$postal_code,$country,
> $email,$url,$password) = split(/\|/, $reseller);	
> 	
> 		if ($INPUT{'id'} == $id) {
> 			if ($crypted_password eq $password) {

In addition to the problem pointed out by Martien Verbruggen [regarding 
generating the salt for the crypt function; by the way, you do not need 
to substr() the first two characters for the salt -- the crypt() 
function will take care of that itself], there is another problem here.

Your variable $password will have a trailing newline character, because 
it is the last piece split from the line read from the input file.

chomp() it!

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 5 Jan 1999 01:33:53 GMT
From: groovy94@aol.com (Groovy94)
Subject: Re: Correct password, but still returns error
Message-Id: <19990104203353.15305.00007294@ng96.aol.com>

Thanks, everyone, I got about 3 emails in about 2 minutes, all saying that I
forgot to chomp the newline. That is probably my problem with this script, once
again, thanks.



Regards,
Gil Hildebrand, Jr.
Dynamic Scripts

Email: groovy94@aol.com
ICQ UIN: 16678754


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

Date: Mon, 04 Jan 1999 17:51:10 -0800
From: TRG Software <chatmaster@c-zone.net>
Subject: Re: Correct password, but still returns error
Message-Id: <3691700E.169322F3@c-zone.net>

Groovy94 wrote:
> 
> Thanks, everyone, I got about 3 emails in about 2 minutes, all saying that I
> forgot to chomp the newline. That is probably my problem with this script, once
> again, thanks.
> 
> Regards,
> Gil Hildebrand, Jr.
> Dynamic Scripts
> 
> Email: groovy94@aol.com
> ICQ UIN: 16678754

Probably? Please post if it was, so it can help other's that may have
these same problems one day.. After all, these will end up in the
Dejanews archive. :-)
--
Regards,
Tim Greer - chatmaster@c-zone.net
TRG Software and The Link Worm
http://www.linkworm.com
The Chat Base
http://www.chatbase.com
-----------------------------------------------------------------------
* Creator of Paradise Chat, Chat Central & Spiral Chat
* Receiving over 250,000+ hits a day from users Worldwide!!!
* Sales of custom chat server scripts * CGI/Perl scripting
* Script trouble shooting/security * Modify & debug scripts
* Freelance Perl Scripting for any purpose or application


       Copyright ) 1998 TRG Software and The Link Worm.


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

Date: Mon, 4 Jan 1999 20:56:52 -0500
From: "Leo" <chaimwerz@yahoo.com>
Subject: Dynamic gifs on the fly
Message-Id: <76rrhv$276s$1@node17.cwnet.frontiernet.net>

Hi
Does anyone overhere know  a perl script that could paste me together 2 gifs
(a picture frame & a metal greting add on)On the fly according to a users
input?
TIA
Leo






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

Date: Mon, 04 Jan 1999 20:16:54 -0500
From: Ernesto Gianola <netog@ziplink.net>
Subject: Re: hash of hashes
Message-Id: <36916806.F9574D9B@ziplink.net>

Martien Verbruggen wrote:
> 
> In article <36915C0D.45C3C4FC@ziplink.net>,
>         Ernesto Gianola <netog@ziplink.net> writes:
> 
> >> > $hash{$key1}{$key2} = [@values]
> >>
> >> That does work. it stores a reference to an anonymous array. To get at
> >> the values you can do a few things..
> >>
> >> $aref = $hash{$key1}{$key2}  # now $aref is a reference to that array
> 
> [snip]
> 
> > My mistake I forgot it does work. Just not the way I want it to.
> > I am using a tied hash to a DBM file.
> 
> I don't think you can use any of the standard tied hash modules to
> store complex structures, but you can get the MLDBM module from CPAN,
> which does allow you to do that.


Yes, I am using that and figured it out from the MLDBM docs. 

Thanks...

Ernesto


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

Date: Mon, 04 Jan 1999 17:05:34 -0800
From: Dale Sutcliffe <dales@enhanced-performance.com>
Subject: Help - replacing text in a file
Message-Id: <3691655D.173CD98B@enhanced-performance.com>

How do you insert into the middle of a file without having to rewrite the whole file.
e.g.,
A file containing:

A|B|C|D
B|C|E|F

I wand to replace the C on the first line with Z in the same file.
How is this done?
Thanks.



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

Date: Tue, 05 Jan 1999 01:13:31 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Help - replacing text in a file
Message-Id: <slrn792pqf.4us.alastair@calliope.demon.co.uk>

Dale Sutcliffe <dales@enhanced-performance.com> wrote:
>How do you insert into the middle of a file without having to rewrite the whole file.

Did you check the FAQ?

-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: 5 Jan 1999 01:11:49 GMT
From: groovy94@aol.com (Groovy94)
Subject: Re: Help - replacing text in a file
Message-Id: <19990104201149.15297.00007183@ng96.aol.com>

Try using a substitute. The syntax is something like 

s/[pattern_to_find]/[pattern_to_replace_with]/

Also, here is a little tutorial on that exact subject:
http://www.extropia.com/faq/perl_faq.html#string_mods
Regards,
Gil Hildebrand, Jr.
Dynamic Scripts

Email: groovy94@aol.com
ICQ UIN: 16678754


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

Date: Tue, 05 Jan 1999 01:34:57 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Help - replacing text in a file
Message-Id: <5%dk2.55$Mw1.1154@nsw.nnrp.telstra.net>

[removed alt.perl. Newsgroup doesn't exist here, and doesn't make
sense to me anyway :)]

In article <3691655D.173CD98B@enhanced-performance.com>,
	Dale Sutcliffe <dales@enhanced-performance.com> writes:
> How do you insert into the middle of a file without having to
> rewrite the whole file.

If it's a text file, you can't (without rewriting) insert anything.
Do what the FAQ suggests, and also read there about the reasons
why this can't just be done:

# perldoc -q 'insert.*line'
=head1 Found in /usr/local/lib/perl5/5.00502/pod/perlfaq5.pod

=head2 How do I change one line in a file/delete a line in a file/insert a line 
in the middle of a file/append to the beginning of a file?

# perldoc perlfaq5

An addition: If you really don't want to rewrite the _whole_ file, you
can always find the position you want to start inserting at, read
everything after that position and store it away, write your stuff at
that position, and append back what you just saved.

I wouldn't say it's really worth the trouble, unless the files are
really really large, and you are inserting close to the end of the
file. In any other case it's much easier, and probably even faster to
just rewrite the whole file.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 75% of the people make up 3/4 of the
Commercial Dynamics Pty. Ltd.       | population.
NSW, Australia                      | 


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

Date: Mon, 04 Jan 1999 20:40:51 -0500
From: Eugene Sotirescu <eugene@verticalnet.com>
To: Dale Sutcliffe <dales@enhanced-performance.com>
Subject: Re: Help - replacing text in a file
Message-Id: <36916DA3.A19D6873@verticalnet.com>

What you want is:

ftp://ftp.metronet.com/pub/perl/doc/FAQs/FAQ/PerlFAQ.html

"How do I change one line in a file/delete a line in a file/insert a line in the middle
of a file/append to the beginning of a file?"

Dale Sutcliffe wrote:

> How do you insert into the middle of a file without having to rewrite the whole file.
> e.g.,
> A file containing:
>
> A|B|C|D
> B|C|E|F
>
> I wand to replace the C on the first line with Z in the same file.
> How is this done?
> Thanks.



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

Date: Mon, 04 Jan 1999 17:49:11 -0800
From: TRG Software <chatmaster@c-zone.net>
Subject: Re: Help Wanted
Message-Id: <36916F97.A60ADA13@c-zone.net>

"bob@tokensystems.com" wrote:
> 
> PERL PROGRAMMER WANTED
> Very experienced in Perl and Linux Red Hat. Must be able to create
> anything we need in Perl, and must be able to adapt to a tremendous
> amount of currently existing code. Sys. Admin skills a big plus. Work at
> 
> home, full time+
> 
> Write bob@tokensystems.com

Please STOP SPAMMING this NG! In your email reply to me, you told me
that you would stop this... Posting the SAME thing over and over daily
for a week, will only annoy people. That's no way to get a real
programmer.
Not only have you still *not* stated what you'll want people to do, but
you're completely clueless and your posts are in comp.lang.perl! That is
a dead NG, and has been for years!

Don't bother replying to this moron's "Must be able to create
anything we need in Perl" BS, it's some lame "survey" email.

Gee bob, you said it wasn't SPAM... I'm so.. um.. disappointed. :-)
--
Regards,
Tim Greer - chatmaster@c-zone.net
TRG Software and The Link Worm
http://www.linkworm.com
The Chat Base
http://www.chatbase.com
-----------------------------------------------------------------------
* Creator of Paradise Chat, Chat Central & Spiral Chat
* Receiving over 250,000+ hits a day from users Worldwide!!!
* Sales of custom chat server scripts * CGI/Perl scripting
* Script trouble shooting/security * Modify & debug scripts
* Freelance Perl Scripting for any purpose or application


       Copyright ) 1998 TRG Software and The Link Worm.


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

Date: Tue, 05 Jan 1999 01:20:15 GMT
From: fatshit@hotmail.com (jm)
Subject: How to Protect sound files in a webpage?????
Message-Id: <36966863.1530522@news.atl.bellsouth.net>

I am looking for a way for someone to play audio file from a webpage
without leaving the file on their pc afterward.  The goal is to keep
the end user from having to install an addon like real audio if
possible.  The files will probably be wave files, but that is not set
in stone.  Any suggestions would be appreciated.


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

Date: Tue, 05 Jan 1999 01:38:36 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How to Protect sound files in a webpage?????
Message-Id: <w2ek2.58$Mw1.1154@nsw.nnrp.telstra.net>

[Follow-up request to poster ignored. I do not consider it good form to
do this. It should _only_ be used to take an off-topic or personal
discussion off the group.]

In article <36966863.1530522@news.atl.bellsouth.net>,
	fatshit@hotmail.com (jm) writes:
> I am looking for a way for someone to play audio file from a webpage
> without leaving the file on their pc afterward.  The goal is to keep
> the end user from having to install an addon like real audio if
> possible.  The files will probably be wave files, but that is not set
> in stone.  Any suggestions would be appreciated.

If they can download it, they can keep it. There's nothing you can do
about it. You could write a propietary server and client to stop it,
possibly, but HTTP won't help you.

Ask for specifics about these sorts of things in one of the
comp.infosystems.www.* groups. It has nothing to do with perl.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Make it idiot proof and someone will
Commercial Dynamics Pty. Ltd.       | make a better idiot.
NSW, Australia                      | 


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

Date: Tue, 05 Jan 1999 11:16:10 +0800
From: Terry Gliedt <tpg@cls.uob.com.sg>
Subject: How to redistribute ActiveState's Perl
Message-Id: <369183F9.F0ED4FC4@cls.uob.com.sg>

I am supporting 40-50 NT machines here which all use Perl. The latest
ActiveState version of Perl is really looking nice. However, the "base"
perl from them is not quite sufficient for our needs.

ppm is a very nice solution for maintaining the "master" version of
Perl. However, because our Internet connectivity is eractic enough, I
don't want to use ppm to add additional packages once the new version of
Perl is installed.

I'm interested in hearing how others have solved this problem. I've got
a few ideas on how I might easily distribute my own collection of
ActiveState perl stuff, but I'd like to hear how others have tackled
this problem.

TIA

--
================================================================
Terry Gliedt     tpg@cls.uob.com.sg    http://www.hps.com/~tpg/
United Overseas Bank               Personal Email:  tpg@hps.com




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

Date: Mon, 04 Jan 1999 22:19:37 -0500
From: Tony Wallace <tonyw@donet.com>
Subject: HP-UX 10.20 aCC / Config script fails on compiler check
Message-Id: <369184C9.6D83@donet.com>

First try installing perl5.005_2 on HP-UX 10.20 w/ aCC compiler.
Two problems so far:

1.  aCC on this machine does not accept -Aa cmdline option, but
the Config script (hints/hpux.sh) keeps trying to add it (CCFLAGS).
I have edited out all -Aa's in hints/hpux.sh and have got
around this problem, or so it seems.

2.  aCC on this machine requires "#include <stdlib.h>" to
provide "exit()" function proto, for exit() calls used in
trivial c programs embedded in the Config script.
However, the Config script does not provide such
#include's.
I don't know how to approach this problem.

Hoping this sounds familiar to someone who recently installed
perl5.005_2 on HP-UX 10.20 with aCC, etc.   

TIA.  Tony Wallace.


Details:
 
I am not familiar with this system, 
but it has "aCC" and not "c89".  
aCC does work if I write a "hello.c" program by hand.  

I am using hints/hpux.sh.  
I am trying to use aCC. 

However, aCC on this machine rejects the -Aa option.  
I therefore edited out all setting of -Aa in CCFLAGS, 
and I got past the first failure.

Then I immediately ran into the second failure.  
It seems that any trivial test program needs to have 
#include <stdlib.h> if it is going to call "exit()".  
However, the Config script contains at least two 
trivial test programs that do call exit() but
do not #include <stdlib.h>.  
I don't quite know what to do at this point.

(I do know I could get a binary perl,
but I will want to use extensions soon,
so I still want to compile.  
Also, I cannot install into /opt/...
I also could use gcc.  I havent tried that yet.
Machine doesnt seem to have it.  
Don't think our sysadmin will like me getting it.)

> Here follows the end of the current Config output.

Checking your choice of C compiler and flags for coherency...
I've tried to compile and run a simple program with:

aCC -O -D_HPUX_SOURCE -o try -L/usr/local/lib
try.c -lnsl_s -lndbm -lmalloc -lm -lc -lndir -lcrypt
 ./try

and I got the following output:

Warning (anachronism) 600: "try.c", line 2 # Type specifier is omitted;
"int" is no longer assumed.
main() { printf("Ok\n"); exit(0); }
^^^^
Error 328: "try.c", line 2 # Function 'exit' has not been defined yet;
cannot call.
main() { printf("Ok\n"); exit(0); }
^^^^


> Here follows the try.c file.  
Note, if I only #include <stdlib.h> in it,
the test will succeed.  

#include <stdio.h>
main() { printf("Ok\n"); exit(0); }


Thanks again.
End of post.


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

Date: 5 Jan 1999 03:02:16 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl file handling
Message-Id: <76rvbo$nji$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    "fff" <regevs@mishkei.org.il> writes:
:A rather basic question:
:I have an ascii file, and a line number. All I want to do is delete the Nth
:line of the file. 

Deleting the Nth line of a file is an operation of a text editor.
Perl is not a text editor.  Perl is a programming language.  You have to
decompose the problem into low-level calls to read, write, open, close,
and seek.  And you have to remember that files are just byte streams,
not stacks of cards one per line.  Although humans have an easy time
thinking of a text file as being a sequence of lines that operates much
like a stack of playing cards -- or punch cards -- computers usually see
the text file as a sequence of bytes.  In general, there's no direct way
for Perl to seek to a particular line of a file, insert text into a file,
or remove text from a file.

See the perlfaq5 manpage, question 2, for more information.

:An alternative question might be, how can I quickly remove
:the Nth cell from an array.

See the perlfunc manpage's entries on shift, pop, and splice.
Note that frequent deletions anywhere but at the ends are 
highly inefficient.

--tom
-- 
In general, if you think something isn't in Perl, try it out, because it
usually is.  :-)
        --Larry Wall in <1991Jul31.174523.9447@netlabs.com>


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

Date: Tue, 05 Jan 1999 02:35:45 GMT
From: Simon.Fairall@hpa.com.au (Simon Fairall)
Subject: Re: Reading comma delimited files
Message-Id: <36917a38.74183940@news.supernews.com>

Unfortunately, it is customer supplied data with thousands of lines,
so hand editing is not so good.

The Text:CSV_XS module seems to do a good job though! Thanks to
everyone who suggested this.

Regards,

Simon

On 4 Jan 1999 19:07:07 GMT, burt@ici.net (Burt Lewis) wrote:

>I save my Excel files as "space delimted" then using a good text editor like 
>Textpad or Ultraedit, I remove all the spaces. This leaven you with a nice 
>clean text file. Forget the csv format.
>
>Let me know if this helps.
>
>Burt Lewis
>
> 
>
>
>In article <368f3036.2927802145@news>, Simon.Fairall@hpa.com.au says...
>>
>>I was wondering whether anyone had written a script to parse comma
>>delimited files (csv format) as from Microsoft Excel (yuk!).
>>
>>The problem of using :-
>>
>>while ($Line = <INFILE>) {
>>        @FieldList = split (/,/, $line);
>>}
>>
>>to seperate the fields is that a text field (delimited by "") could
>>legally contain a comma.
>>
>>I would appreciate some insight from all you Perl guru's and hackers
>>on how to solve this problem.
>



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

Date: 4 Jan 1999 21:33:40 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Retrospective on comp.lang.perl.moderated?
Message-Id: <76rtm4$bde$1@monet.op.net>

In article <x3y1zlbf2rq.fsf@tigre.matrox.com>,
Ala Qumsieh  <aqumsieh@matrox.com> wrote:
>How does one register anyway? 

You post to the group.  If you're not registered, you will get a
registration form in the mail.  After you reply to the registration
form, you're registered.

If you want to register without posting, you should send a note to
mjd-clpm-register@plover.com.

>No one mentioned before that posting to clpmod needed registration. 
>Is it a secret? (maybe I was just ignorant)

It's not a secret.

Greg Bacon posts the group's FAQ every week with the subject
	[comp.lang.perl.moderated] Welcome - read this first! 

The FAQ contains instructions on how to register.

Also, the registration requirement appears in the group's charter,
which was posted here twice during the discussion prior to the
creation of the moderated group.  The registration process and
requirement was discussed extensively here and in news.groups.

See the FAQ at http://www.plover.com/clpm/ for more details.

>I tried posting more than once to c.l.p.mod, but I never saw my
>posting get through (nor have I received a rejection or any other
>email).


Whenever you send an article, one of three things should happen:

	1. You get a registration form in the mail.  (Unregistered
	   users only.)

or	2. Your article is approved and appears in the newsgroup,
	   probably within 36 hours. 
	   (Most articles are approved within three hours.)

or	3. Your article was rejected, and you get a rejection notice
	   in the mail from the moderator who rejected your article.  
	   We do not reject articles silently.

If none of these things happens, then either

	1. You're an unregistered user and the registration form
	   bounced on the way to you, 

or	2. Your article never arrived here at all.


I checked the records, and no article of yours has ever arrived here.
This may indicate a failure of your news system, which you should take
up with your news administrator.

If you can't get your news system fixed, you can post by mailing your
article to mjd-clpm-submit@plover.com.



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

Date: Tue, 5 Jan 1999 12:08:29 +1000
From: "Andrew Pollock" <apollock@bit.net.au>
Subject: Sendmail 8.9.1 makemap hash format and Perl
Message-Id: <76rs75$ssv$1@news.bix.asn.au>

Apologies if I'm asking a FAQ...

The following Perl code doesn't work with hashes built with makemap that
comes with Sendmail 8.9.1

dbmopen %ALIASES, "/etc/aliases", 0666 || die "Can't open aliases: $!\n";

while (($key,$val) = each %ALIASES) {
        print $key, ' = ', $val, "\n";
}
dbmclose %ALIASES

Is there any way to get this functionality back?

Andrew



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

Date: Mon, 04 Jan 1999 21:01:27 -0500
From: Bob Mariotti <bobm@cunix.com>
Subject: Sync time script???
Message-Id: <36917276.64E20B43@cunix.com>

Has anyone used perl to connect to the Naval Observatory to obtain the
correct time and then use it to set the server clock?  Dejanews searches
seem to only return syncing with other servers.  Any suggestions
appreciated...




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

Date: Mon, 4 Jan 1999 22:36:22 -0500
From: "Webmaster" <webmaster@somewhere.com>
Subject: Re: Sync time script???
Message-Id: <76s170$4j7$1@nd.eastky.net>

try this as a crontab command instead.

rdate -e www.fyi.net > /dev/null

Bob Mariotti <bobm@cunix.com> wrote in message
news:36917276.64E20B43@cunix.com...
>Has anyone used perl to connect to the Naval Observatory to obtain the
>correct time and then use it to set the server clock?  Dejanews searches
>seem to only return syncing with other servers.  Any suggestions
>appreciated...
>
>




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

Date: Mon, 4 Jan 1999 19:52:57 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: variables in templates?
Message-Id: <p9rr67.hm1.ln@magna.metronet.com>

Rosemary I H Powell (Rosie@dozyrosy.demon.co.uk) wrote:
: What I want to do is specify a set of text templates at the start of a
: script, e.g.

: $add_confirmation = qq[Your $name has been added  to the list.];

: where the variable $name will not be known/allocated until later into
: the script.


   Then don't try interpolating it the assignment above, as $name
   will be replaced with the empty string.

   use one 'q', not two.


: Is there a way to do this, or does anyone have any suggestions about how
: to approach this, please?


   Perl FAQ, part 4:

      "How can I expand variables in text strings?"


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

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

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