[13811] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1221 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 29 15:06:17 1999

Date: Fri, 29 Oct 1999 12:05:36 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941223935-v9-i1221@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 29 Oct 1999     Volume: 9 Number: 1221

Today's topics:
    Re: [offtopic] English (Craig Berry)
    Re: [offtopic] English <flavell@mail.cern.ch>
    Re: adding data to beginning of file <kjetilskotheim@iname.com>
    Re: adding data to beginning of file <lr@hpl.hp.com>
    Re: Can not run another program from CGI-script <alex@kawo2.rwth-aachen.de>
    Re: Can not run another program from CGI-script <dan@tuatha.sidhe.org>
    Re: Capture HTML tags. <emschwar@rmi.net>
    Re: COM automation server in Perl? (Scott McMahan)
    Re: COM automation server in Perl? (Kragen Sitaker)
        Embedding perl <sackj@rpi.edu>
    Re: FAQ 3.9: Is there an IDE or Windows Perl Editor? <tim.westlakeNOtiSPAM@myremarq.com.invalid>
    Re: FAQ 8.8: How do I get the screen size? (John Stanley)
    Re: great regex strips quotes... but... (Craig Berry)
    Re: How do you strip spaces? dragnovich@my-deja.com
    Re: How to read from Game Port in Win32 (Bbirthisel)
        How to touch a file in perl? <matthew@davin.ottawa.on.ca>
    Re: How to touch a file in perl? (M.J.T. Guy)
    Re: It is always like this here? <jboes@qtm.net>
    Re: It is always like this here? (Jon Bell)
    Re: It is always like this here? <chuckwilliams1@netscape.net>
    Re: It is always like this here? <bivey@teamdev.com>
    Re: It is always like this here? <bivey@teamdev.com>
    Re: It is always like this here? <lr@hpl.hp.com>
    Re: jpeg-files (Michael Budash)
        LA Area Perl Dev. Needed <newyorkskate@yahoo.com>
    Re: length (number of items) of an array (Craig Berry)
    Re: length (number of items) of an array (Craig Berry)
    Re: MS ACCESS and Perl (Scott McMahan)
    Re: MS ACCESS and Perl (Scott McMahan)
        open MYFILE, ">-" doesn't work in CGI? <NoSpam@JSoft.xs4all.nl>
    Re: Perl and Excel (Scott McMahan)
    Re: Perl and Excel (Scott McMahan)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 29 Oct 1999 16:46:47 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: [offtopic] English
Message-Id: <s1jjrnm4csf89@corp.supernews.com>

Stephen Lee - Post replies please (nobody@nowhere.net) wrote:
: >: > paranoid (genlabs@gmx.net) wrote:
: >: > : and mildly ignore it's dumbness .
                           ^^^^
: Sorry for being off-topic, but can you explain why you are frustrated?
: I don't see any possessive "its" in the original quote...

Marked in quoted text above.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Fri, 29 Oct 1999 19:17:25 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: [offtopic] English
Message-Id: <Pine.HPP.3.95a.991029191544.5569C-100000@hpplus01.cern.ch>

On Fri, 29 Oct 1999, Craig Berry wrote:

> Stephen Lee - Post replies please (nobody@nowhere.net) wrote:
> : >: > paranoid (genlabs@gmx.net) wrote:
> : >: > : and mildly ignore it's dumbness .
>                            ^^^^
> : I don't see any possessive "its" in the original quote...
> 
> Marked in quoted text above.

I don't see any possessive there either.  Mayb'e yo'u ar'e imaginin'g
thing's.

What you have marked is a contraction.



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

Date: Fri, 29 Oct 1999 18:21:28 +0200
From: Kjetil Skotheim <kjetilskotheim@iname.com>
To: Aaron Walker <amwalker@gate.net>
Subject: Re: adding data to beginning of file
Message-Id: <3819D798.27D14A1D@iname.com>

Aaron Walker wrote:
> 
> I am attempting to write a perl script that writes data to the beginning
> of a file.  The way I plan on doing this is by reading in the current
> data file into say @data, then writing the current data into the file,
> then writing the data in @data after the current data.  Is there a
> fuction that does this or another easier way of doing this in perl?
> 
> thanks,
> Aaron

$file="file.txt"; #file to prepend
@newdata=(...); #lines of new data
open(NEW,">new$file"); for(@newdata){print NEW "$_\n"}
open(OLD,$file); while(<OLD>){print NEW "$_\n"}
close(OLD); close(NEW);
unlink $file; rename "new$file",$file;


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

Date: Fri, 29 Oct 1999 11:31:15 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: adding data to beginning of file
Message-Id: <MPG.128387cd41f970df98a15b@nntp.hpl.hp.com>

In article <3819D798.27D14A1D@iname.com> on Fri, 29 Oct 1999 18:21:28 
+0200, Kjetil Skotheim <kjetilskotheim@iname.com> says...
> Aaron Walker wrote:
> > 
> > I am attempting to write a perl script that writes data to the beginning
> > of a file.  The way I plan on doing this is by reading in the current
> > data file into say @data, then writing the current data into the file,
> > then writing the data in @data after the current data.  Is there a
> > fuction that does this or another easier way of doing this in perl?
> 
> $file="file.txt"; #file to prepend
> @newdata=(...); #lines of new data
> open(NEW,">new$file"); for(@newdata){print NEW "$_\n"}
> open(OLD,$file); while(<OLD>){print NEW "$_\n"}

Why do you want to insert an empty line after each line copied from the 
original file?

    print NEW while <OLD>;

> close(OLD); close(NEW);
> unlink $file; rename "new$file",$file;

At least you used the same approach as the FAQ that so many others 
responding to this thread have pointed to.  But you do not add value by 
failing to test the success of system calls or by introducing a bug.

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


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

Date: Fri, 29 Oct 1999 18:33:18 +0200
From: Alex Farber <alex@kawo2.rwth-aachen.de>
Subject: Re: Can not run another program from CGI-script
Message-Id: <3819CC4E.44F57955@kawo2.rwth-aachen.de>

Alex Farber wrote:
>I have a CGI script edit-gazeti.pl which adds an URL to a
>database and another script print-gazeti.pl which generates
>a web page out of this database and runs as a cron job.

Well, I have spent few hours before I realized that that
script didn't have the permissions to print a web page :-(
Thank you

/Alex


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

Date: Fri, 29 Oct 1999 18:06:14 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Can not run another program from CGI-script
Message-Id: <qmlS3.272$c06.2119@news.rdc1.ct.home.com>

Alex Farber <alex@kawo2.rwth-aachen.de> wrote:
> Hi,

> I am using "perl, version 5.005_55 built for sun4-solaris"

You have a pre-beta development version of perl 5.6. You do *not* want to
be using this version. It's unstable, wacky, broken in odd spots, and
generally unsafe. 

The current production release of perl is 5.005_03. Use that version
instead. Your life will be much more pleasant. (Which doesn't necessarily
address your problem--you probably don't want to be doing what you think
you do, but there's not enough detail to really diagnose things)

					Dan


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

Date: 29 Oct 1999 11:38:33 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Capture HTML tags.
Message-Id: <xkfhfjadq3q.fsf@valdemar.col.hp.com>

"=B9=DA=C1=BE=BA=B9 \(Park, Jong-Pork\)" <okpolis@okclub.com> writes:
> $regexp =3D '<A(.*?)>(.*?)<\/A>'; # fixed.

> I hope this print result, "Link site name1\nLink2\nLink3".
> BUT it work "Link site name1</A> or next <A ...>Link2</A> and\nLink3";
>
> What I need to change?

Drop the regex and use a real HTML parser?  Or use HTML::Parser, which is =

close enough for most purposes.

-=3DEric
-- =

"Cutting the space budget really restores my faith in humanity.  It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation."
                -- Johnny Hart


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

Date: Fri, 29 Oct 1999 16:24:58 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: COM automation server in Perl?
Message-Id: <uTjS3.6275$hK6.316007@monger.newsread.com>

Domenico Viggiani (viggiani@hotmail.com) wrote:
> Can I use COM automation server with Activestate Perl?

Can you!? And how! Perl is actually the best language you could use for
such a task, and doing so is trivially easy. I wrote an entire book about
it, see the URL below. It has examples of using small things like the
Windows Scripting Host objects, and bigger things like Microsoft Office.

Scott

http://autoperl.skwc.com Automating Windows With Perl




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

Date: Fri, 29 Oct 1999 17:04:22 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: COM automation server in Perl?
Message-Id: <qskS3.6371$23.386744@typ11.nn.bcandid.com>

In article <uTjS3.6275$hK6.316007@monger.newsread.com>,
Scott McMahan <scott@aravis.softbase.com> wrote:
>Domenico Viggiani (viggiani@hotmail.com) wrote:
>> Can I use COM automation server with Activestate Perl?
>
>Can you!? And how! Perl is actually the best language you could use for
>such a task, and doing so is trivially easy. I wrote an entire book about
>it, see the URL below. It has examples of using small things like the
>Windows Scripting Host objects, and bigger things like Microsoft Office.

By the way, I have just obtained your book (sorry for the delay) and I
will post a review here later, after I finish reading it.  Capsule
review for the curious: lots of good information, lots of buggy Perl
code, terrific writing style, rather poor typesetting and copy-editing
(does R&D not employ a copy-editor?), actual real opinions which are
immensely valuable, good high-level overview of what it covers, lots of
material that is related only to Perl or COM Automation but not both.
(The first couple of chapters implement a broken cron and a broken SMTP
mail sender.)

Oh, and you have a preface by Herbert Schildt, which almost made me
throw the book away immediately.  (See
http://www.plethora.net/~seebs/c/c_tcr.html if you don't know what kind
of a writer Herbert Schildt is.)
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Thu Oct 28 1999
12 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Fri, 29 Oct 1999 14:33:43 -0400
From: "Jeff Sack" <sackj@rpi.edu>
Subject: Embedding perl
Message-Id: <SLlS3.2369$JD1.153609@typhoon.nyroc.rr.com>

Hi, sorry if this post is a duplicate.  I'm working on a project that has a
Java GUI and perl guts on Win32.  I'm (finally) able to embed perl into Java
(via C), but when I try to use a perl module, I get an error message like
this:

501 Can't load module IO, dynamic loading not available in this perl.
  (You may need to build a new perl executable which either supports
  dynamic loading or has the IO module statically linked into it.)BEGIN
failed--compilation aborted at C:\perl\5.00503\lib/MSWin32-x86/IO/Socket.pm
line 117.

I know this is self explanatory, but I'm not sure exactly how to accomplish
this.  Do I need to rebuild perl with some specific flag in the makefile set
to support dynamic loading?  I think I'd like to have it statically link in
if possible.  Any suggestions?  My envirnment includes MS VC++ 6.0, JDK
1.2.2, and Perl 5.00503.  Any help would be greatly appreciated...

-Jeff






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

Date: Fri, 29 Oct 1999 09:17:49 -0700
From: Tim Westlake <tim.westlakeNOtiSPAM@myremarq.com.invalid>
Subject: Re: FAQ 3.9: Is there an IDE or Windows Perl Editor?
Message-Id: <137c77a0.5157675e@usw-ex0101-007.remarq.com>

You can try ZEUS (www.zeusedit.com). Its a great little editor and
comes with language files for PERL, Java, C, C++ etc. etc. and you can
even create your own.

Tim


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: 29 Oct 1999 17:56:42 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: FAQ 8.8: How do I get the screen size?
Message-Id: <7vcn4q$1jp$1@news.NERO.NET>

In article <3819d7f8@cs.colorado.edu>,
Tom Christiansen  <perlfaq-suggestions@perl.com> wrote:
>(This excerpt from perlfaq8 - System Interaction 
>    ($Revision: 1.39 $, $Date: 1999/05/23 18:37:57 $)
>part of the standard set of documentation included with every 
>valid Perl distribution, like the one on your system.
>See also http://language.perl.com/newdocs/pod/perlfaq8.html
>if your negligent system adminstrator has been remiss in his duties.)
>
>  How do I get the screen size?
>
>    If you have Term::ReadKey module installed from CPAN, you can use
>    it to fetch the width and height in characters and in pixels:

You can perhaps fetch the width and height in characters of the current
window, but on modern operating systems with modern windowing systems
that rarely is the same as the screen size. 




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

Date: Fri, 29 Oct 1999 17:45:36 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: great regex strips quotes... but...
Message-Id: <s1jna0rlcsf55@corp.supernews.com>

Trent (trent@jps.net) wrote:
: this code snippet works excellent on quoted csv's.
: 
: undef @data;
: push(@data, defined($1) ? $1:$3)
: while m/"([^"\\]*(\\.[^"\\]*)*)"|([^,]+)/g;
: 
: But, after manipulating the data, and then attempting the join,
: 
: $line = join (",", map { "\"$_\"" } @data);

The expression in the block might be more legibly written as

  qq("$_")

or the like.

: the map adds more quotes than I originally had.
: Is the solution obvious to anyone?

Well, to start with, adding unneeded quotes to a CSV line should be
harmless.  You may wish to just let it happen, since this is the simplest
course.

If you decide to quote only where needed, the trick is to decide where it
is needed.  If any expression containing a comma or double-quote needs to
be quoted, and that's the *only* case needing to be quoted, this will do
the trick: 

  $line = join (",", map { /[,"]/ ? qq("$_") : $_ } @data);

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Fri, 29 Oct 1999 15:59:38 GMT
From: dragnovich@my-deja.com
Subject: Re: How do you strip spaces?
Message-Id: <7vcg98$tvl$1@nnrp1.deja.com>

It is simple try:

while($string =~ /  /) { $string =~ s/  / /g; }


In article <Pine.LNX.4.10.9910290858360.22062-100000@fnord.io.com>,
  Poohba <poohba@io.com> wrote:
> I am trying to strip all spaces more than one.  I want to delete all
of
> the spaces except for one space.  How is this done?
>
> 	      *		Web Page Designs	  *
> 	     / poohba@io.com  |  www.io.com/~poohba\
> 	     ---------------------------------------
> 	     \ For info about me send message with /
> 	      *      subject "send file help"     *
>
>

--
------------------------
Juan Carlos Lopez
QDesigns President & CEO
http://www.qdesigns.com


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 29 Oct 1999 18:19:57 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: How to read from Game Port in Win32
Message-Id: <19991029141957.15788.00000058@ng-fq1.aol.com>

Hi:

>Yeah, I didn't see anything in the SerialPort
>module either. Maybe it's in the CommPort module.

Well, I can assure you it is not in CommPort either. I don't
have a game port on any system I commonly use, so I
have never worried about dealing with it.

>I've seen references elsewhere to
>using a C or C++ function called inportb to read
>from i/o port 201(hex i suppose). I've also read
>in newsgroups that there doesn't seem to be a perl
>module that implements the inportb function, unless
>you can do this with CommPort or SerialPort.

Win32::SerialPort and Win32API::CommPort make API
calls (via Win32::API), not raw hardware calls (which
inportb does, essentially overriding the driver in 95/98 -
and probably croaking in NT/2K, although I have not
tried it).

There may be API functions to deal with the game port,
and CommPort could serve as a template for writing a
module that would access them, but I have never heard
of anyone trying that approach.

-bill
author, SerialPort and CommPort
Making computers work in Manufacturing for over 25 years (inquiries welcome)


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

Date: 29 Oct 1999 16:16:47 GMT
From: Matthew Darwin <matthew@davin.ottawa.on.ca>
Subject: How to touch a file in perl?
Message-Id: <7vch9f$1km$1@caribou.davin.ottawa.on.ca>

What's a safe way to touch a file in perl?

`touch $filename` is not the solution I'm looking for but it does do what
I want. The complete perl solution should handle files or directories on a
Unix system.

open HANDLE, ">$filename" || die;
# do something?
close HANDLE

I checked the FAQ, but can't find anything on this topic.

Thanks in adavance,
Matthew


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

Date: 29 Oct 1999 18:20:08 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: How to touch a file in perl?
Message-Id: <7vcogo$qip$1@pegasus.csx.cam.ac.uk>

Matthew Darwin  <matthew@davin.ottawa.on.ca> wrote:
>What's a safe way to touch a file in perl?
>
>`touch $filename` is not the solution I'm looking for but it does do what
>I want. The complete perl solution should handle files or directories on a
>Unix system.

You're pointing in the right direction, but ...

>open HANDLE, ">$filename" || die;
># do something?
>close HANDLE

Oooooooooooo!   Ouch!    You've just destroyed that pre-existing file.

And you've got a precedence problem  -  that die will never happen,
as it parses as

 open HANDLE, (">$filename" || die);

Try instead

 open HANDLE, ">>$filename" or die "touch $filename: $!\n";
 close HANDLE;

See       perldoc -f open
          perldoc perlopentut


Mike Guy


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

Date: Fri, 29 Oct 1999 16:03:18 GMT
From: Jeff Boes <jboes@qtm.net>
Subject: Re: It is always like this here?
Message-Id: <7vcgg3$u35$1@nnrp1.deja.com>

In article <000b8d9b.40a12527@usw-ex0101-001.remarq.com>,
  Mark Bluemel <mark.bluemelNOmaSPAM@siemens.co.uk.invalid> wrote:
>
> Is it always like this, or have I picked a bad time?

Good question. I think it gets worse just before the first Perl
assignment is due in Comp Sci 201 (Programming II) at the local
community college...

Seriously, Perl is a popular language, and yet for some folks the
learning curve is high, especially if they come from an environment
where the IDE holds their hand a lot more (I'm thinking of Visual
Basic, but I have to admit that since I've never written a line of VB
that's probably a prejudicial assessment).

Additionally, everybody and his sister seem to be trying to put
together an e-commerce site with a shopping cart and a counter and a
search page and a ... All these folks are "self taught" on HTML, and
maybe even know a bit of Javascript, how to chmod something after they
FTP it, etc. Now they're ready to take the next step into this rocket-
fueled CGI stuff they've heard about, and Perl seems to be the tool of
choice.

So we get a lot of questions here from people writing their first line
of Perl code (for various reasons) and from people who confuse CGI
questions with Perl questions.

Personally, I find the attitudes of the newcomers flat out
amazing. "Why is this stuff so hard? Why can't I get a 25 word answer?"
Good Lord. I've been a professional programmer for 20 years. It took 6
months before I felt I could call myself a Perl programmer, another 12
before I felt confident in calling myself a professional CGI scripter.
The idea that you can learn Perl/CGI in a weekend is analogous to me
deciding that since I have my learner's driving permit, I ought to be
able to figure out how those NASCAR guys make those cars go so fast--
after all, they just drive around and around in a big circle.


>
> Are there techniques we could use to improve things, like frequently
> posted pointers to FAQs etc... (No, not the whole flaming things - if
> people can read news, surely they can find a web page given a hint)?
Or
> is it simply that Perl attracts a vast number of <insert your
> uncomplementary epithet here>?

There are in fact paragraphs from the FAQ auto-posted here (take a look
at the subject headers and you'll spot 3-6 of them newly posted every
day), and a few of the long-time denizens appear to have adopted some
kind of boilerplate response ("It appears you are asking a CGI
question, why don't you go to comp.infosystems.www.authoring.cgi?"), so
one can hope that the S/N ratio improves. Personally, I skim this
newsgroup once a day, never expecting to find too much of use to me but
it's worth the 20 mins I give it. I keep hoping
for 'comp.lang.perl.novice' or something to draw off the newbies...


--
Jeff Boes  jboes@qtm.net
http://www.qtm.net/~jboes/


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 29 Oct 1999 17:02:13 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: It is always like this here?
Message-Id: <FKDJBp.8E0@presby.edu>

 Mark Bluemel  <mark.bluemelNOmaSPAM@siemens.co.uk.invalid> wrote:
>
>Are there techniques we could use to improve things, like frequently
>posted pointers to FAQs etc...

In case you haven't noticed, a general pointer to FAQs is posted twice a
week, with a title that contains something like YOUR QUESTIONS ANSWERED
HERE.  If it were posted any more often, it would be cancellable spam.

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
        [     Information about newsgroups for beginners:     ]            
        [ http://www.geocities.com/ResearchTriangle/Lab/6882/ ]


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

Date: Fri, 29 Oct 1999 17:16:41 GMT
From: Chuck Williams <chuckwilliams1@netscape.net>
Subject: Re: It is always like this here?
Message-Id: <7vckpk$1io$1@nnrp1.deja.com>

Chris,

No offense to this great group, but I wouldn't DREAM of trying to learn
Perl here. Personally, about 11 months ago I set about learning Perl
and just 12 weeks ago I felt confident enough to get regularly involved
in comp.lang.perl.misc

Chuck Williams

>
> # I've been teaching myself Perl for a few weeks, with moderate
success,

> Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 29 Oct 1999 17:46:32 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: It is always like this here?
Message-Id: <01bf2235$c56058a0$3527e1ce@bill.jump.net>

Greg Bacon <gbacon@ruby.itsc.uah.edu> wrote in article
<7vcbvu$i9h$5@info2.uah.edu>...
> comp.lang.perl.misc is really a gold mine.  Think of a real gold mine.
> Is it solid gold through and through?  Nope, you have to dig a little.
> With a little experience, you learn what to look for.

And, sometimes you're overcome by noxious fumes before
you reach the nuggets. (The parakeet's not dead, it's
just resting. Keep digging.) -Wm


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

Date: 29 Oct 1999 17:50:44 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: It is always like this here?
Message-Id: <01bf2236$5b175f60$3527e1ce@bill.jump.net>

Mark Bluemel <mark.bluemelNOmaSPAM@siemens.co.uk.invalid> wrote in article
<000b8d9b.40a12527@usw-ex0101-001.remarq.com>...
> I've been teaching myself Perl for a few weeks, with moderate success,
> so I thought I'd join the newsgroup. After just one day, I'm more than
> half inclined to drop out again. Large amount of traffic, huge
> noise-to-signal ratio, cluelessness in abundance and a fair proportion
> of abuse - these all add up to somewhere that I'm not feeling like
> hanging round in.
> 
> Is it always like this, or have I picked a bad time?

Seems to be the worst in purely language-related newsgroups.
I've found that, while the cluelessness is just as high,
the newbie-toasting is less pronounced in newsgroups
devoted to creating applications. Don't know why,
just my observation.-Wm


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

Date: Fri, 29 Oct 1999 11:39:06 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: It is always like this here?
Message-Id: <MPG.128389a13eb7ea6e98a15c@nntp.hpl.hp.com>

In article <pudge-2910991143560001@192.168.0.77> on Fri, 29 Oct 1999 
15:44:58 GMT, Chris Nandor <pudge@pobox.com> says...
> In article <000b8d9b.40a12527@usw-ex0101-001.remarq.com>, Mark Bluemel
> <mark.bluemelNOmaSPAM@siemens.co.uk.invalid> wrote:
> 
> # I've been teaching myself Perl for a few weeks, with moderate success,
> # so I thought I'd join the newsgroup. After just one day, I'm more than
> # half inclined to drop out again. Large amount of traffic, huge
> # noise-to-signal ratio, cluelessness in abundance and a fair proportion
> # of abuse - these all add up to somewhere that I'm not feeling like
> # hanging round in.
> 
> That is why comp.lang.perl.moderated was created.

And has almost no traffic, hence almost no information.

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


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

Date: Fri, 29 Oct 1999 11:38:45 -0700
From: mbudash@wcws.com (Michael Budash)
Subject: Re: jpeg-files
Message-Id: <mbudash-2910991138450001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <3819bdc6$0$32608@reader1.casema.net>, "Michiel Lankamp"
<mlankamp@hotmail.com> wrote:

> Is it possible to check the height and width of a jpeg-file? If possible,
> how?
> 
> Thankz

check? if you mean 'determine' or 'get', see Image::Size ... see cpan.org ...

hth-
-- 
Michael Budash ~~~~~~~~~~ mbudash@wcws.com


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

Date: Fri, 29 Oct 1999 15:06:02 -0400
From: "Al Gerra" <newyorkskate@yahoo.com>
Subject: LA Area Perl Dev. Needed
Message-Id: <7vcqp8$btv$1@bgtnsc02.worldnet.att.net>

Our company is developing a business-to-business e-commerce site, and we are
looking to hire a Perl developer.  We are based a little north of LA in
Westlake Village.  You can email me at

agerra@total-nospam-funding.com

for more details.  Remove -nospam- for correct address.  Sorry if this is
off-topic for the NG.




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

Date: Fri, 29 Oct 1999 16:52:38 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: length (number of items) of an array
Message-Id: <s1jk6mthcsf15@corp.supernews.com>

Philip 'Yes, that's my address' Newton (nospam.newton@gmx.li) wrote:
: On 28 Oct 1999 14:40:09 GMT, gbacon@ruby.itsc.uah.edu (Greg Bacon)
: wrote:
: 
: >        return 0 if $#_ == -1;
: 
: What if someone outside of your subroutine fiddles with $[ ?

You shoot them.  I'm submitting a patch for 5.006 that floods the
developer's cubicle with poison gas if $[ is changed.

However, you can easily get around the above (at some cost in obscurity,
but for a net perl golf gain) by writing it as

  return 0 unless @_;

Or, retaining both obscurity and the evil evil evil $[,

  return 0 if $#_ - $[ == -1;

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Fri, 29 Oct 1999 16:55:59 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: length (number of items) of an array
Message-Id: <s1jkcvfdcsf10@corp.supernews.com>

Abigail (abigail@delanet.com) wrote:
(wrt $[)
: Why is it that it's deprecated, every seems to be saying "don't do that",
: yet the possibility of doing so is raised again and again?

Because everybody (or at least everybody who is a perl guru or aspires to
the position) loves dwelling on hidden gotchas in dark corners of the
language.  Personally, I read all code snippets presented here with the
assumption that $[ is 0 unless explicitly set otherwise, and I imagine
everyone else (who is aware of the issue at all) does the same.  So it
comes down to harmless but occasionally distracting gamesmanship.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Fri, 29 Oct 1999 16:27:38 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: MS ACCESS and Perl
Message-Id: <_VjS3.6276$hK6.316007@monger.newsread.com>

oneill78 (oneillNOonSPAM@cs.uregina.ca.invalid) wrote:
> Does anybody know where I can get info on using Perl with
> MS access without using a server

You can't use a server, since Access is not a client/server
database.

Scott


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

Date: Fri, 29 Oct 1999 16:29:21 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: MS ACCESS and Perl
Message-Id: <BXjS3.6278$hK6.316007@monger.newsread.com>

oneill78 (oneillNOonSPAM@cs.uregina.ca.invalid) wrote:
> Do you know of any good books that I can follow to help me
> set up a database using perl.

Unfortunately, not. About all you'll find is the Perl Resource Kit's
scanty examples of DBI. Most of it is just trial and error for me. I
got it working after a little learning curve. If you know SQL, the DBI
interface is not hard to learn.  For SQL, you can get something like SQL:
The Complete Reference and start learning it.

Scott



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

Date: Fri, 29 Oct 1999 20:13:28 +0200
From: "Willem Joosten" <NoSpam@JSoft.xs4all.nl>
Subject: open MYFILE, ">-" doesn't work in CGI?
Message-Id: <7vco62$j7i$1@news1.xs4all.nl>

Hi,

I've written some routines who output to a file if a filename is passed or
stdout otherwise. The code looks like this:

sub myroutine {
    my $filename = $_[0];
    if ($filename ne ""){ open MYFILE, $filename; } else { open MYFILE,
">-" }
    print MYFILE "blabla";
    close (MYFILE);
}

From the commandline this works fine but when I use the CGI packages nothing
is printed except for output directly to stdout (print "Blabla";).

Does CGI do some trick with stdout and is there a way to make this work
anyway?


Regards

Willem Joosten






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

Date: Fri, 29 Oct 1999 16:36:17 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: Perl and Excel
Message-Id: <52kS3.6281$hK6.316007@monger.newsread.com>

Gala Grant (gala@sonic.net) wrote:
> I need to use Perl to open an Excel Spreadsheet and pull out info, and then
> dynamically create a web page based on the pulled info.

This is a bad, bad, bad, bad, bad, bad, bad, bad, bad, bad, bad design. If
you do this (please don't), you will create the SLOWEST web application
in the history of the Internet. What you want to do is routinely export
the data into something else like a high-powered relational database or
even indexed DBM files or SOMETHING so you do not have to start an Excel
instance every time you want the data. Even putting the data in a CSV
file and parsing it each time would be faster, but a performance-designed
relational database (SQL Server, DB2, PostgreSQL, etc) would be the way
to go. You could even embed a PerlScript on an ASP page, and 
use ODBC to connect to the Excel spreadsheet. That would be another
way to go, but nowhere near as fast as a real database.

>  Does anyone have
> any info on using Perl to manipulate Excel?  Is there a module or any text
> about it somewhere?

I recommend my book Automating Windows With Perl, not becuase I wrote it
and sold 1 copy in 3Q99 and am worried about my career as a technical
author being stillborn, but because it is the only one I know that has
anything like this :)

Excel is VERY hard to use from Perl, because every version of Excel has
its own variation on the Excel object model: my book uses Excel 97, but
older Perl examples I've seen will not work properly with that version
of Excel.

Scott

http://autoperl.skwc.com Automating Windows With Perl



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

Date: Fri, 29 Oct 1999 16:37:03 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: Perl and Excel
Message-Id: <P2kS3.6282$hK6.316007@monger.newsread.com>

Asquith (asquith@macconnect.com) wrote:
> Looking for a 100% Perl module that can take an Excel file and convert it 
> variously delimited files or open the Excel file, convert it, and pipe it
> downstream.  I'm developing an application on Solaris and Linux and need to
> interface transparently to Excel files sitting on the NFS.

> Suggestions?

You're not going to find it.

The closest thing I've seen is StarOffice, which can read and write
Excel code. Use their routines in Java.

Scott


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

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

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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


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