[7977] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1602 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 8 15:18:25 1998

Date: Thu, 8 Jan 98 12:00:26 -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           Thu, 8 Jan 1998     Volume: 8 Number: 1602

Today's topics:
     Re: 2 file scripts and -w <rootbeer@teleport.com>
     [Q] Perl-mode.el for [x]emacs ? ()
     Re: bison for perl <jdporter@min.net>
     Re: Blank rows, Data is missing. abrown@demon.net
     Re: CgiWrap - perl: can't map file error (Andrew M. Langmead)
     Re: Convert .bmp to .jpg via Perl <rootbeer@teleport.com>
     Re: Database File Manipulation? <perlguy@inlink.com>
     Re: File Format Query scott@softbase.com
     Re: file glob restrictions?! (Matthew Cravit)
     Re: file glob restrictions?! <joseph@5sigma.com>
     Re: file glob restrictions?! <joseph@5sigma.com>
     Re: file glob restrictions?! <tchrist@mox.perl.com>
     FILE SIZE LIMITS????? (10K)??? <anbgb@anbgb.demon.co.uk>
     Re: FILE SIZE LIMITS????? (10K)??? (James Stricherz)
     Re: FILE SIZE LIMITS????? (10K)??? <jack_h_ostroff@groton.pfizer.com>
     Re: Find two strings in a file <jdporter@min.net>
     Re: Good place to start in Perl 5 <bwb@concentra.com>
     Help! AIX perl make failure... (Mark Bronnimann)
     Re: How to Configure Perl with IIS 4.0  WHERE IS ADSUTI <gilles.simon@st.com>
     Looking for a perl script... (Dan Cash)
     Re: Markees <jdporter@min.net>
     Re: Perl editor needed (Kevin Reid)
     Re: Perl programming with NT4.0: sendmail problem <*@qz.to>
     Re: Perl programming with NT4.0: sendmail problem (warn unpack 'u*','5<V%M=65L;$!C:7,N=6%B+F5D=0T*')
     Re: Perl programming with NT4.0: sendmail problem <KIMANDKELLEY@prodigy.net>
     Perl to EXE <stdrat01@unx1.shsu.edu>
     Re: Perl to EXE <tchrist@mox.perl.com>
     Re: print SOCK "Whatever"; <tchrist@mox.perl.com>
     Re: Search/sorting question <kevin@wx3.com>
     Searching text file with perl ecsspear@livjm.ac.uk
     Re: serious post about gmtime and year-1900 (was Re: Pe <Russell_Schulz@locutus.ofB.ORG>
     Re: Telnet client written in perl <*@qz.to>
     Using internal hooks to warn and die in Win32 Perl (Tom Moore)
     Win32 module with Perl 5.004_2 <bowlin@sirius.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 8 Jan 1998 10:13:29 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Philip Wall / Wild Card <wallp@earthlink.net>
Subject: Re: 2 file scripts and -w
Message-Id: <Pine.GSO.3.96.980108101123.26818S-100000@user2.teleport.com>

On Wed, 7 Jan 1998, Philip Wall / Wild Card wrote:

>   With use strict, perl throws errors about packages. 

You probably want to 'use vars qw/$foo/'. If the docs for vars.pm don't
help you to get what you need, please ask again. Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 8 Jan 1998 19:28:02 GMT
From: nicholas@neko.binary9.net ()
Subject: [Q] Perl-mode.el for [x]emacs ?
Message-Id: <slrn6baa5n.4i0.nicholas@neko.binary9.net>

Is there a more recent version of the perl-mode.el that comes with
Xemacs 20.x ?

I'm looking for support for several things that I can't seem to hack
myself, such as variable-name coloring in font-lock-mode, support for
  <<EOT

EOT

notation as strings and the like.

TIA

-- 
___________________________________________________________________________

 simple is elegant                                    nicholas@binary9.net
___________________________________________________________________________


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

Date: Thu, 08 Jan 1998 13:46:08 -0500
From: John Porter <jdporter@min.net>
Subject: Re: bison for perl
Message-Id: <34B51EF0.5534@min.net>

the count wrote:
> 
> Zenin wrote:
> >
> > John Porter <jdporter@min.net> wrote:
> > : The binaries are not distributed. You have to compile them
> > : yourself.  That's the Internet/Unix Way!
> >
> >         Actually, they are for many systems.  Check out a sunsite
> >         for Solaris stuff such as ftp://sunsite.unc.edu/pub/solaris/sparc

Well, sure, anyone can make anything available if they want to.
Is that official enough to be called a "perl distribution"?

> They kind of have to for solaris, as Solaris doesn't bloody come
> with a C compiler standard! :(

So? As long as gcc is available, you don't need binaries... at least
for the common unix flavors (including Solaris).

> And they might for Win95 & NT as it is a real pain to try and port
> stuff from UNIX to Win32...

It makes sense to distribute the binaries for Win32 platforms, because
they're binary-compatible.

John Porter
jporter@logicon.com


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

Date: Thu, 08 Jan 1998 10:51:46 -0600
From: abrown@demon.net
Subject: Re: Blank rows, Data is missing.
Message-Id: <884278121.749142019@dejanews.com>

In article <34B428E0.E0A4D9E5@mayers.de>,
  Christian Roth <cr@mayers.de> wrote:
>
> Hi!
>
> I got a little bit further.
> Now I am able to read out of my database! BUT all
> I get out of it are blank rows. I inserted a $count to count my rows.
> The number at the end is correct and matches the number of records in
> the database. But my table is filled with blank rows. NO DATA? WHERE IS
> THE DATA?
>
> Thanks for all of your help
>
> Christian
>
> Here my code:
>


Replacing data with Data in the following bit of code should do the trick

Anthony

>
>     while ($db->fetchrow) {
>             $company   = $db->data(COMPANY);
>             $postaddr  = $db->data(POSTADDR);
>             $locality  = $db->data(LOCALITY);
>             $town      = $db->data(TOWN);
>             $phone     = $db->data(PHONE);
>             $fax       = $db->data(FAX);
>             $mobile    = $db->data(MOBILE);
>             $title     = $db->data(TITLE);
>             $name      = $db->data(NAME);
>             $fname     = $db->data(FIRST NANE);
>             $heracode  = $db->data(HERACODE);
>

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Thu, 8 Jan 1998 18:21:11 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: CgiWrap - perl: can't map file error
Message-Id: <EMH9nB.60@world.std.com>

Piotr Klaban <makler@man.torun.pl> writes:

>De facto the problem is not a perl problem, but many users could
>find that problem only when they are running the perl CGI script
>from cgiwrap. That is why I think it is good to send current
>article also to the perl newsgroup.

Is there any reason why CGIWrap will only exhibit itself when running
a perl script and not something created in C, Fortran, Lisp, TCL,
Python, shell or awk?
-- 
Andrew Langmead


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

Date: Thu, 8 Jan 1998 10:15:20 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Eric Hilding <eric@garlic.com>
Subject: Re: Convert .bmp to .jpg via Perl
Message-Id: <Pine.GSO.3.96.980108101436.26818T-100000@user2.teleport.com>

On 8 Jan 1998, Eric Hilding wrote:

> Does anyone know if a .bmp graphics file can be
> converted to a .jpg format via a perl script?

There are some modules on CPAN which may be able to help you, or you
could use Perl to run ImageMagick. Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Thu, 8 Jan 1998 17:23:37 GMT
From: Brent Michalski <perlguy@inlink.com>
To: Michael Georgiadis <michael.georgiadis@btinternet.com>
Subject: Re: Database File Manipulation?
Message-Id: <34B50B99.B1BBB1B3@inlink.com>

Michael,

I have a tutorial on text databases at:
http://www.inlink.com/~perlguy/simple

It contains all the code and descriptions on how to implement it.

Brent


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

Date: 8 Jan 1998 16:39:20 GMT
From: scott@softbase.com
Subject: Re: File Format Query
Message-Id: <692vfo$o6c$3@mainsrv.main.nc.us>

tchorzewska (mtchorze@srd.bt.co.uk) wrote:
> Is it possible to write from perl to a file in .xls format

Not, it is not possible in any practical sense.

Microsoft Excel's XLS files are COM storages. You could not create one
without using the COM interfaces for manipulating storages. The storage
file format is not published and is not intended to be manipulated
outside of the COM interfaces for it -- COM storages don't even have to
be actual files and in the future could not be. (Imagine them as BLOBs
in a SQL Server database in NT 9.0, for example.)

Even if you could write a Perl add-in to access COM storages easily,
the XLS file format is hairy. You wouldn't want to manipulate a raw XLS
file. There's a book called the Excel Developer's Kit (or something
similar) that details the file format, and it is not for the faint of
heart.

Your alternatives are: 

	1. Use a neutral format like CSV and import it into
	Excel

	2. Generate HTML with Excel extension tags for formulas, and
	import it into Excel. This has the added benefit of being
	usable in non-Excel situations if you supply alternatives for
	the Excel formuals.  (The book Excel 97 Developer's Handbook
	discusses these Excel-specific extensions, and yes, you have to
	be using Excel 97.)

	3. If Perl is running on Win32, use Automation
	and plug the data directly into a worksheet.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: 8 Jan 1998 09:40:27 -0800
From: mcravit@best.com (Matthew Cravit)
Subject: Re: file glob restrictions?!
Message-Id: <69332b$50q$1@shell3.ba.best.com>

In article <692mcs$1up$1@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
>In comp.lang.perl.misc, joseph@5sigma.com writes:
>:We should emphasize that: readdir is like, WAY faster.
>
>Critically so?  I don't agree.  And most of its users screw it up
>anyway, which means if it's wrong, it doesn't matter how fast it is.
>These are similar:

[snip]

Assuming that people don't screw it up, it seems readdir is in fact
markedly faster. I fed both of your code snippits to the Benchmark
module, and on my system (Sparc 10/70Mhz, Solaris 2.6, Perl 5.004_04),
I get the following results:

Benchmark: timing 100 iterations of Glob, ReadDir...
      Glob: 13 secs ( 0.30 usr  0.32 sys +  3.39 cusr  6.59 csys = 10.60 cpu)
   ReadDir:  2 secs ( 1.94 usr  0.07 sys =  2.01 cpu)

I'm conjecturing that much of the overhead in using glob is coming from the
spawning off of a csh process, but I'm not sure.

/MC

-- 
Matthew Cravit, N9VWG               | Experience is what allows you to
E-mail: mcravit@best.com (home)     | recognize a mistake the second
        mcravit@taos.com (work)     | time you make it.


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

Date: Thu, 08 Jan 1998 11:33:14 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
To: Tom Christiansen <tchrist@mox.perl.com>, gbarr@pobox.com
Subject: Re: file glob restrictions?!
Message-Id: <34B51BB7.646BBCB8@5sigma.com>

Having pondered this a bit more, I'm wondering if perhaps the
best solution would be to modify IO::Dir so that it could optionally
return complete pathnames.  Probably the simplest approach would
be to add a method like $dh->fullpathnames() to toggle the mode
off and on.  Implementation-wise, the $dh object returned by IO::Dir
would have to be a hash containing a sym and a path rather than just 
a blessed sym.  Anyway, it wouldn't be a big programming chore.
It would have to be tweaked for non-Unix filenames, though.

Thoughts?  Comments?

	-joseph

Tom Christiansen wrote:
> 
>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, joseph@5sigma.com writes:
> :We should emphasize that: readdir is like, WAY faster.
> 
> Critically so?  I don't agree.  And most of its users screw it up
> anyway, which means if it's wrong, it doesn't matter how fast it is.


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

Date: Thu, 08 Jan 1998 11:37:11 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
To: gbarr@pobox.com, tchrist@mox.perl.com
Subject: Re: file glob restrictions?!
Message-Id: <34B51CA3.306EA2E5@5sigma.com>

Oh, having looked closer at the code, 

      ${*$dh}{io_dir_path} = $dirname;

sticks out.  Doh!  So really it's just a matter of adding a flag.

	-joseph

Joseph N. Hall misinformedly wrote:
> 
> Implementation-wise, the $dh object returned by IO::Dir
> would have to be a hash containing a sym and a path rather than just
> a blessed sym.


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

Date: 8 Jan 1998 19:24:49 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: file glob restrictions?!
Message-Id: <693961$n1q$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, joseph@5sigma.com writes:
:Oh, having looked closer at the code, 
:      ${*$dh}{io_dir_path} = $dirname;
:sticks out.  Doh!  So really it's just a matter of adding a flag.

Might as well make <$dh> work while you're at it.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    Though I'll admit readability suffers slightly... 
                    --Larry Wall in <2969@jato.Jpl.Nasa.Gov>


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

Date: Thu, 08 Jan 1998 18:06:36 GMT
From: "ANB" <anbgb@anbgb.demon.co.uk>
Subject: FILE SIZE LIMITS????? (10K)???
Message-Id: <01bd1c5f$10aac5e0$ce54989e@anbexter>

I am doing a simple read character from a file, and printing into another
(print IN $letter).

The original file is 1Mb but the new file stops automatically when it
reaches 10K....
WHY?????

Anybody knows???? Grateful for an answer. I thought perl had no boundaries
except for the system memory.
Thank you 
Deli


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

Date: Thu, 08 Jan 1998 13:41:40 -0500
From: stricherz@coaps.fsu.edu (James Stricherz)
Subject: Re: FILE SIZE LIMITS????? (10K)???
Message-Id: <stricherz-0801981341410001@aggie.coaps.fsu.edu>

In article <01bd1c5f$10aac5e0$ce54989e@anbexter>, "ANB"
<anbgb@anbgb.demon.co.uk> wrote:

+ I am doing a simple read character from a file, and printing into another
+ (print IN $letter).
 
+ The original file is 1Mb but the new file stops automatically when it
+ reaches 10K....
+ WHY?????

Dunno. There's nothing magical (that I know of) about 10kb. What does
the code look like??

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: Thu, 08 Jan 1998 13:41:14 -0500
From: "Jack H. Ostroff" <jack_h_ostroff@groton.pfizer.com>
Subject: Re: FILE SIZE LIMITS????? (10K)???
Message-Id: <34B51DCA.42E2@groton.pfizer.com>

ANB wrote:
> 
> I am doing a simple read character from a file, and printing into another
> (print IN $letter).
> 
> The original file is 1Mb but the new file stops automatically when it
> reaches 10K....
> WHY?????
> 
> Anybody knows???? Grateful for an answer. I thought perl had no boundaries
> except for the system memory.
> Thank you
> Deli
More information, please.  What platform?  What actually happens?  Any
error messages?  Are you using -w?  Is the file correctly copied up to 
that point?

If you are on a DOS based system, is it possible the file contains a
CTL-Z character?  If so, the operating system may be taking this as end
of file.

Good luck.


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

Date: Thu, 08 Jan 1998 13:53:08 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Find two strings in a file
Message-Id: <34B52094.29C8@min.net>

Joseph N. Hall wrote:
> 
> while (<>) {
>     exit if ($s1 ||= /string 1/) & ($s2 ||= /string 2/);
> }
> print "not found\n";
> 
> No, that single & isn't a typo.

Ok, but could the ||= be?


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

Date: Thu, 8 Jan 1998 13:15:38 -0500
From: "Brent Benson" <bwb@concentra.com>
Subject: Re: Good place to start in Perl 5
Message-Id: <69354i$690$1@icadnewshost.concentra.com>

Gabriele Endress wrote in message <34B3CC1B.54AB15AC@symbios.com>...
>
>I'm really interested in learning Perl 5 so I can begin writing my own
>CGI scripts. I was wondering if any of you had a recommendation of any
>good beginners books for me start with?
>
>This would be the first hard core programming language I'd be learning.
>The only other "code" I've ever learned are HTML and BASIC. :-)


I highly recommend "Learning Perl" by Randal Schwartz and Tom Christiansen
for someone with limited programming experience.  In addition to basic
Perl programming it covers things like writing CGI scripts in Perl.

The following site has Perl book reviews and recommendations:

  http://www.flathill.com/languages/perl/









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

Date: 8 Jan 1998 18:54:37 GMT
From: markb@fatty.cmj.com (Mark Bronnimann)
Subject: Help! AIX perl make failure...
Message-Id: <6937dd$lv@news9.noc.netcom.net>


  OK, I'm a newbie in the sys admin realm of UN*X and I need some help building 
perl. I've been a user on many different systems, but I've been pretty much 
limited to building web apps and small perl/C apps.

  I'm running AIX 4.2.1 and I ran through the Configure script, and everything 
seems to be in order. I'm using gcc as a compiler. When I do make test, make 
install, or just plain make, it fails with:

   gcc -L/usr/local/lib -o miniperl miniperlmain.o libperl.a
   collect2: ld returned exit 8 status
   ld: 0711-317 ERROR: undefined symbol: .pow
   [snip... similar errors for several different symbols like atan2, tan, sin]

   It says the error code returned is 1, but I'm not sure where to look for 
 this code.

   Am I missing a library somewhere? Any insight what-so-ever would be a great 
help.

	thanks in advance!


--
Mark Bronnimann
Webmaster/MIS
CMJ Online, Inc.
http://www.cmj.com


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

Date: Thu, 8 Jan 1998 18:21:02 +0100
From: "Gilles Simon" <gilles.simon@st.com>
Subject: Re: How to Configure Perl with IIS 4.0  WHERE IS ADSUTIL ???
Message-Id: <34b50bce.0@peek.stmicroelectronics.com>

Steve,

do you know where is the adsutil.exe file, I cannot find it though I
installed all NT4 options ?

Thks,
Gilles.

Steve West wrote in message <34B3D9AA.3C54B64B@metafuse.com>...
>For all you who are trying to run IIS 4.0 and perl here is what you have
>to do to configure it to run properly on IIS 4.0.
>
>I have outlined a two step process to get it to work...here goes
>
>****** STEP 1.   CONFIGURE PERL TO WORK WITH IIS 4.0*****
>Microsoft changed from having the script mappings in the registry to the
>a
>configuration in the service manager.  Now script mappings are changed
>in the
>default website properties.
>
>Go to the default website, right mouse click on the properties for that
>site....
>
>then click on "Home Directory" tab
>Go to the "Applications Settings" toward the bottom of the window...find
>
>the "Configuration" button...the click on  it.  A new window called
>script
>mappings exists..you need to either create a new script mappings or edit
>the old
>one.
>
>It should look like this
>
>.cgi        c:\perl\bin\perl.exe %s %s
>.pl         c:\perl\bin\perl.exe %s %s
>
>I had those set before in the registry...as you may have too...and MS
>IIS 4.0
>pulled the values out and capitalized the %S %S...that wont work..it
>looked like
>this
>
>*** MICROSOFT PUT THIS THERE...IT WILL NOT WORK ***
>.pl      C:\PERL\BIN\PERL.EXE %S %S
>
>*** YOU MUST CHANGE MAPPING TO LOOK LIKE THIS***
>.cgi        c:\perl\bin\perl.exe %s %s
>.pl         c:\perl\bin\perl.exe %s %s
>
>
>
>***** STEP 2.  CONFIGURE PERL TO WORK WITH STANDARD I/O *****
>
>By default you cannot use standard I/O redirection with perl and IIS
>4.0.
>
>You have to configure this into the metabase.  Here is how you do it:
>You need to run a command line from the:
>"\winnt\system32\inetsrv\adminsamples" directory
>
>When you get there type this on the command prompt
>
>adsutil set w3svc/CreateCGIWithNewConsole TRUE
>
>You may get an error becuase the .vbs is not set, just click on yes, and
>retype the command if you get that error.
>
>You will have to stop the default website, and restart it from the
>internet service manager to make the changes.
>
>NOTE:  If for some reason you cannot get the adsutil at the command
>prompt, or you get unrecognized command, you may want to search for it
>using the start menu, find.  Look on your system for "adsutil.vbs".  If
>you still cannot find it, you perhaps did not install all the
>samples...you may go to the Windows NT 4.0 Option pack setup from the
>start menu and check to see if you can install the administration
>samples.  I am not sure if the adsutil.vbs shipped in all cases, but
>most of you will have it in your
>"winnt\system32\inetsrv\adminsamples" directory.
>
>I hope this note helps you guys and keeps you from having same trouble I
>had.
>
>Steve West
>
>
>
>
>




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

Date: Thu, 08 Jan 1998 17:40:24 GMT
From: dmcash@facstaff.wisc.edu (Dan Cash)
Subject: Looking for a perl script...
Message-Id: <34b50dc4.154762460@news.doit.wisc.edu>

Hello All,

We have a problem with an application which is in 
the process of being moved to a new server and
required some perl editing because of safety 
concerns from the new server's admin. The edits
have caused the application to become unstable:
after several users have visited, it hangs at odd
times. We're working on it, but the check means
we have to hit the page and submit a form, many
many times.  About a hundred, actually.

We are looking for a simple perl script that might
do that for us automatically. We're under a deadline,
so sitting down to write one isn't an option until we've
got this little problem fixed. At the moment I'm plowing
through the freeware sites looking for something that
might work, but I thought I'd check here just in case
somebody could stop us from re-inventing the wheel.

Anybody?


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

Date: Thu, 08 Jan 1998 14:02:08 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Markees
Message-Id: <34B522B0.22C6@min.net>

Scott Vetter wrote:
> 
> Is there a Perl program out there that will put out a markee to the
> netscape/I.E. browser?  This markee would be shown on the browser line
> that shows "Document: Done" in Netscape.

Scott,
May I gently point out that the word is "marquee"...


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

Date: Thu, 8 Jan 1998 14:27:15 -0500
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Perl editor needed
Message-Id: <1d2dgnb.19ax3jx1jym91uN@slip166-72-108-220.ny.us.ibm.net>

<scott@softbase.com> wrote:

> James Hurd (jhurd@indiana.edu) wrote:
> > : Learning Emacs is a good
> > : investment in your programming career...
> 
> >     When I first began writing Perl and Java, I resisted
> >  learning Emacs.When I finally broke-down andd beganb toi learn it;
> >  it made things so much easier.
> 
> Emacs is particularly good for beginners in various languages,
> particularly Perl, because its syntax highlighting and autoindent
> modes help you notice screwups sooner. When something turns
> the *wrong* color, or the indention starts getting really
> weird looking, you know you made a syntx error somewhere
> in your source. Since Perl has more syntax and more funny
> punctuation than a lot of languages, it's more important.
> 
> Scott

Okay, so (most) everybody on this thread is saying Emacs is great, but
is there a Macintosh version?

-- 
Kevin Reid


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

Date: 8 Jan 1998 17:28:04 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Perl programming with NT4.0: sendmail problem
Message-Id: <qz$9801081222@qz.little-neck.ny.us>

John Goor <splyc2@klm.nl> wrote:
> Now I want to invoke a 'feedback' option, however: In Unix I use 'sendmail',
> being invoked from a Perl script.
> Ofcourse NT hasn't such a tool, but is there another way to accomplish what
> I want: 'sendmail for NT'?

Maybe Net::SMTP from CPAN will do the trick for you? Or perhaps the Mail::
stuff?

<URL:http://www.perl.com/CPAN/>

Elijah
------
moving into brain (d foy) and Tom (Phoenix) domain


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

Date: Thu, 08 Jan 1998 17:39:06 GMT
From: s@non.org (warn unpack 'u*','5<V%M=65L;$!C:7,N=6%B+F5D=0T*')
Subject: Re: Perl programming with NT4.0: sendmail problem
Message-Id: <884280723.327@207.53.4.13>


In article <qz$9801081222@qz.little-neck.ny.us> on 8 Jan 1998 17:28:04 GMT,
 Eli the Bearded <*@qz.to> wrote:

> John Goor <splyc2@klm.nl> wrote:

>> Now I want to invoke a 'feedback' option, however: In Unix I use 'sendmail',
>> being invoked from a Perl script.
>> Ofcourse NT hasn't such a tool, but is there another way to accomplish what
>> I want: 'sendmail for NT'?

> Maybe Net::SMTP from CPAN will do the trick for you? Or perhaps the Mail::
> stuff?

Also, try posting your request to news group 'comp.mail.sendmail'.




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

Date: Thu, 8 Jan 1998 13:06:30 -0500
From: "Kelley W Phillips" <KIMANDKELLEY@prodigy.net>
Subject: Re: Perl programming with NT4.0: sendmail problem
Message-Id: <69345i$32a0$1@newssvr04-int.news.prodigy.com>

John Goor wrote in message <6923p6$fu8$1@ocsgw2.klm.nl>...
>Hello,
>
>Hopefully you may know the answer to my problem I'm really stuck with:
>I am programming some Perl scripts for an Intranet site, which runs on a
>Windows NT 4.0 platform.
>Now I want to invoke a 'feedback' option, however: In Unix I use 'sendmail',
>being invoked from a Perl script.
>Ofcourse NT hasn't such a tool, but is there another way to accomplish what
>I want: 'sendmail for NT'?
>Please help. I'm waiting anxiously for an answer...
>
>Thanks in advance.
>Regards,
>
>John Goor
>(John.Goor@Turnkiek.nl)
>


  You could use the Socket module, and use sockets to make
a connection to the pop3 server (over port '110'), or if you already
have code for UNIX, you could use it and instead of calling
sendmail, call 'wsendmail'. wsendmail is (if I remember right) a
simple freeware program for Win 95 and NT. I don't remember
where you get it, but you should be a able to find it pretty quickly
with a web search on it's name. Good luck!

-K





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

Date: Thu, 08 Jan 1998 11:20:44 -0600
From: "Robert A. Thompson" <stdrat01@unx1.shsu.edu>
Subject: Perl to EXE
Message-Id: <34B50AEC.BAC3E072@unx1.shsu.edu>

I have seen a program on the web once that will convert a perl script to
an .exe If anyone knows where I may find this could they please let me
know.

Thanks in advance,

Robert A.Thompson



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

Date: 8 Jan 1998 19:37:14 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl to EXE
Message-Id: <6939ta$n1q$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, stdrat01@unx1.shsu.edu writes:
:I have seen a program on the web once that will convert a perl script to
:an .exe If anyone knows where I may find this could they please let me
:know.

It's a deception.  Give up.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

#ifdef USE_STD_STDIO    /* Here is some breathtakingly efficient cheating */
    --Larry Wall, from sv.c in the v5.0 perl distribution


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

Date: 8 Jan 1998 19:40:06 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: print SOCK "Whatever";
Message-Id: <693a2m$n1q$3@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    Tobias Bugala <TobiasBugala@swol.de> writes:
:but if I want to reply by
:print SOCK "Anything";
:I don't get an answer. If I type exactly the same strings in a
:telnet-session it works.

No, you don't type the same thing.  You forgot a newline.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    echo "I can't find the O_* constant definitions!  You got problems."
            --The Configure script from the v5.0 perl distribution


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

Date: Thu, 08 Jan 1998 13:20:20 -0500
From: "Kevin J. Lin" <kevin@wx3.com>
To: Greg Bacon <gbacon@adtran.com>
Subject: Re: Search/sorting question
Message-Id: <34B518E4.5FD861AD@wx3.com>

Thanks;

That's a good solution, but I'm not sure it will work in my case.  The
client provides the data, at which point the two are already in the same
file.  The script which runs on the file doesn't really have time to
sort the file again.

Perhaps my question my be better posed to an excel newsgroup, on how
excel might sort the data better prior to export.

Thanks anyway!

Greg Bacon wrote:
>         "Kevin J. Lin" <kevin@wx3.com> writes:
> : For a client I have a database of items, from which a CGI script is
> : looking up various products (say, from the customers shopping cart).  To
> : speed things up (it's a large database), the products are sorted by a
> : unique code.  It's a binary lookup and quite fast.
> :
> : Here's the problem.  Testing was done with all numeric codes; it turns
> : out some codes have numerics as well, eg: 123456768X.  The database (MS
> : Excel) sorts starting with all numbers, then going to numbers with
> : characters.  So 99999 is BEFORE 1111X, but after 11111.
> 
> [snip]
> 
> : How might I rewrite my comparison routine to search through the list the
> : way Excel has chosen to sort them (ie., numbers first, then strings).
> 
> One way to do it is to start by separating the wheat from the chaff:
> 
>     my @numbers;
>     my @strings;
> 
>     for (@items) {
>         push @{ /^\d+$/ ? \@numbers : \@strings }, $_;
>     }
> 
>     my @final = ( (sort { $a <=> $b } @numbers), (sort @strings) );
>


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

Date: Thu, 08 Jan 1998 12:13:18 -0600
From: ecsspear@livjm.ac.uk
Subject: Searching text file with perl
Message-Id: <884175871.1373503501@dejanews.com>

I am trying to get a perl script that will search a text file on the web
for a keyword then return that part of the text file with the results.

Eg - I am searching a list of e-mail addressess for the keyword 'brian' -
I expect it to return

brian@wibble.com
g.rbrian@smith.com
pete@briany.com

etc
etc

Does anyone know how I can do this - I have tried botching site search
scripts but they all just return file names :(

Thanks

Simon

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Thu, 8 Jan 1998 17:45:33 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: serious post about gmtime and year-1900 (was Re: Perl not Y2K compliant)
Message-Id: <19980108.174533.3X0.rnr.w164w@locutus.ofB.ORG>

chip@pobox.com writes:

>>it does all depend on the underlying C runtime supplying the correct
>>number -- and we all know there are no errors in the C runtime, right?
>
> Well, the C runtime is an issue with your C compiler vendor, not
> Perl's maintainers.

I don't understand:  if it's a C issue, people shouldn't test it?
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: 8 Jan 1998 18:25:22 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Telnet client written in perl
Message-Id: <qz$9801081229@qz.little-neck.ny.us>

Stefan Herz <e9427662@stud2.tuwien.ac.at> wrote:
> I need a telnet client (for MS NT), which is written in perl.
> Does anboy know, where to find such a telnet client ?

Do you think Ptty::Telnet from CPAN might do what you need?

Elijah
------
#!/usr/bin/perl -- -*- my ny.pm sig -*-
$_=$^ ;s;s;sss;;s^.^ju^&&s&P+&\n&&&(s(_..)(ers)||s|^|^^|)&&s(T)(q(st%eg))eg;
s<.(o).><$& new 1$$>i+s+\dst.+$a--||reverse(q(rep k))+ge;s*%.+u* so+*i;s=\++
="me"=mex&&s%ege%l$"hke%;$a||s/^\S+ /\/\//;s;\d+;yor;;s[KE]<ac$&>i;print $_;


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

Date: Thu, 08 Jan 1998 19:26:11 GMT
From: Tom.Moore@DaytonOH.NCR.COM (Tom Moore)
Subject: Using internal hooks to warn and die in Win32 Perl
Message-Id: <#FPWFtGH9GA.187@rpc1285.daytonoh.ncr.com>

I am trying to use the internal hooks to warn and die provided by setting 
$SIG{__DIE__} and $SIG{__WARN__} to log messages to the NT event log.  
Unfortunately, setting $SIG{__DIE__} seems to screw up the Win32::EventLog 
package.  The test program below has a simple main section that calls warn, 
die, or log_event based on the argument provided.  As shown, any logging 
attempt will result in two messages in the event log.  The first is the one 
the program writes, as expected.  The second is an error message stating the 
following:

        Goto undefined subroutine &AutoLoader::AUTOLOAD at 
        C:\Perl\lib/Win32/EventLog.pm line 49..

Commenting out the line setting $SIG{__DIE__} will stop the generation of the 
second message (and also logging of die messages).  

Any suggestions as to why this does not work and how to fix it?  

Thanks.

=============== program listing ===============
require "NT.ph";
use Win32;

##############################################################################
# Log an event in the event log.
# Syntax: log_event(type, message, data)
##############################################################################
use Win32::EventLog;
sub log_event
{
        my($eventtype, $strings, $data) = @_;
        my $EventLog;
        # open the event log.
    Win32::EventLog::Open($EventLog , "Exchange Utilities", '') || die $!;
    # define the event to log.
    $Event =
    {
        'EventType' => $eventtype,
        'Category' => 0,
        'EventID' => 1,
        'Data' => "$data",              # data to be shown as hex and ascii
        'Strings' => "$strings",        # Message to log
    };
    # report the event and check the error
    $EventLog->Report($Event) || die $!;
}


##############################################################################
# Write warn and die messages to the error log
##############################################################################
#local $SIG{__DIE__} = sub { log_event(EVENTLOG_ERROR_TYPE, "@_", ''); die 
"@_"; };
local $SIG{__WARN__} = sub { log_event(EVENTLOG_WARNING_TYPE, "@_", ''); };

##############################################################################
# Main for testing
# Call different routines based on argument provided
##############################################################################
$arg = shift;
if($arg == 1) {
        printf("Debug: Testing warning\n");
        warn "Testing warning\n";
} elsif($arg == 2) {
        printf("Debug: Testing die: $!\n");
        die "Testing die: $!\n";
} elsif($arg == 3) {
        printf("Debug: Testing log_event\n");
        log_event('warn', "Testing log_event", '');
} else {
        print "Unknown arg: $arg\n";
}

printf("Debug: End of program\n");

exit 0;


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

Date: Thu, 08 Jan 1998 11:00:04 -0800
From: Jim Bowlin <bowlin@sirius.com>
Subject: Win32 module with Perl 5.004_2
Message-Id: <34B52234.8ADCEB0E@sirius.com>

I am having a heap of trouble with this module.

For example: I can't get either

Win32::NetAdmin::UserCreate($server, $self->{user}, $self->{password},
    0, $temp->{priv}, '', '', $temp->{flags}, $self->{script})
or

Win32::AdminMisc::UserSetAttributes($server, $self->{user}, 
$self->{fullname}, $self->{password}, '', '', '', '', '', '')

to work.  I've tried many variations.  They return false but
I can not find any error messages.

Also the masks in the Win32::FileSecurity seem messed up.
For example: when Windoze says that a user has read(RX) permission,
the mask is set to 001200A9 while the full complement of masks is
reported to be:

0000ffff  SPECIFIC_RIGHTS_ALL
00010000  DELETE
00020000  READ_CONTROL STANDARD_RIGHTS_EXECUTE
STANDARD_RIGHTS_READ                     STANDARD_RIGHTS_WRITE
00040000  WRITE_DAC
00080000  WRITE_OWNER
000f0000  STANDARD_RIGHTS_REQUIRED
00100000  SYNCHRONIZE
00120000  R READ
00130000  C CHANGE
001f0000  STANDARD_RIGHTS_ALL
001f01ff  F FULL
01000000  ACCESS_SYSTEM_SECURITY
02000000  MAXIMUM_ALLOWED
10000000  GENERIC_ALL
20000000  GENERIC_EXECUTE
40000000  GENERIC_WRITE
80000000  GENERIC_READ

What boat did I miss?


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 1602
**************************************

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