[7979] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1604 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 8 20:17:47 1998

Date: Thu, 8 Jan 98 17:00:22 -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: 1604

Today's topics:
     Re: [Help] Capturing STDOUT under DOS ? (Augusto Cardoso)
     [Help] How to span a perl PACKAGE over multiple source  (Tarang K. Patel)
     Anyone got a pretty printer for perl? (Michael Schilli)
     Best Perl module for web -> postgres? (Barry G Reville)
     Complex Data Stucture <rets@meta3.com>
     Re: Complex Data Stucture speed@racer.cartoon.spam.address
     CRYPT() <snelson2@home.com>
     Re: File Format Query <rootbeer@teleport.com>
     Re: File Format Query (brian d foy)
     Re: How to Tar & unzip Perl mods on CPAN site on Win32? <reibert@mystech.com>
     Re: How to Tar & unzip Perl mods on CPAN site on Win32? <seidel@bigfoot.com>
     I need help <mkt@emred.com>
     Re: language (Martien Verbruggen)
     Re: language <ldanna@hotmail.com>
     Re: Markees (Martien Verbruggen)
     match weirdness - $_++ vs. $_ + 1 (Josh Kortbein)
     Re: Newbie: Problem with file handling under WindozeNT  <Richard.Locke@sni.nl>
     Re: Newbie: Problem with file handling under WindozeNT  <Richard.Locke@sni.nl>
     Re: Perl and Visual Basic? <ldanna@hotmail.com>
     Re: perl on 64 bit HP "merced" platform ?? (Terry Michael Fletcher - PCD ~)
     Re: Perl programming with NT4.0: sendmail problem <*@qz.to>
     Re: Perl Question <ldanna@hotmail.com>
     Re: Perl to EXE blair@mdb.net
     Re: Perl to EXE <rra@stanford.edu>
     Re: Perl to EXE (Greg Zevin)
     Re: Simple string length <*@qz.to>
     Re: Simple string length (Martien Verbruggen)
     Re: Simple string length (Glenn W. Hoffman)
     Re: Tech writer lifts burden from programmers <jdporter@min.net>
     Re: Text->HTML script <craig@scot.demon.co.uk>
     Re: Win32--Add to program to system tray or Hide while  <ldanna@hotmail.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 08 Jan 1998 23:25:47 GMT
From: cardoso.a@mail.telepac.pt (Augusto Cardoso)
Subject: Re: [Help] Capturing STDOUT under DOS ?
Message-Id: <34b55964.3301486@news>

"Jack H. Ostroff" <jack_h_ostroff@groton.pfizer.com> wrote:

>Augusto Cardoso wrote:
>> 
>> What can I do to capture the output of Perl programs to a disk file
>> insted of screen ? I tried all "redirection" and other "piping" I
>> could think of, no results!
>> Ex.
>> POD2TEXT C:\PERL\README.POD
>> 
>> ... I would like to catch the output for later printing ...
>> Thanks for suggestions.
>
>Doesn't
>   POD2TEXT C:\PERL\README.POD > savefile.txt
>work?

The result is a "savefile.txt" with a size of 0 (and really empty...)



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

Date: 8 Jan 1998 23:49:08 GMT
From: maumau@nas.nasa.gov (Tarang K. Patel)
Subject: [Help] How to span a perl PACKAGE over multiple source files ?
Message-Id: <693olk$orp$1@cnn.nas.nasa.gov>
Keywords: modules, perl, package

Hi,

 As per subject line, I desire to create a "package" that spans multiple
 source files. According to the Camel book one can do just this but does
 not show how ?

 Also if one can have "multiple" packages source in a single module (.pm) 
 file then :

  1) How does one declare the "use" statement ?

  2) What is the naming convention that one has to follow for the packages
     aftre the first package ?


 Thus :

 file1
 ------

 package Visual::A;
 ..
 ....
 (some_perl_code)
 ....
 package B;
 ....
 ....
 (some_perl_code)
 ....
 package C;
  

 file 2
 ------

 use Visual::A;

  3) How do I ensure the symbol tables for "package C" are accessed here ?
 

 I would appreciate anyone responding to this message that if they could
 kindly cc: the responde to me - maumau@nas.nasa.gov, as I do not often
 get a chance to catch up this news group.

 Many thanks for any response to this help request.

  Tarang
-- 
Tarang Kumar Patel.    
NASA Ames Research Center, MS 258-1, Moffett Field, CA 94035-1000
Email: maumau@nas.nasa.gov, Tel:(650) 604-4721 fax: (650) 604 2238
Stated views are my own IDEA, as I'm another I.D.E.A man "I Didn't Explain All"


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

Date: 8 Jan 1998 22:43:09 GMT
From: schilli@tep.e-technik.tu-muenchen.de. (Michael Schilli)
Subject: Anyone got a pretty printer for perl?
Message-Id: <693kpt$6ie@sunsystem5.informatik.tu-muenchen.de>

Hi everybody,

has anyone written a keyword-highlighting, line-numbering program
for Perl-Scripts? Just asking before re-inventing the wheel ...

--
Michael 


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

Date: 8 Jan 1998 23:08:35 GMT
From: breville@uoguelph.ca (Barry G Reville)
Subject: Best Perl module for web -> postgres?
Message-Id: <693m9j$bn0@ccshst05.uoguelph.ca>

	I am building a web interface to postgres on an SGI and I would 
like your opinions on the best module(s) and the method(s) - Yes, I have 
looked on CPAN but there seem to be a number that are suitable,

Thanks in advance (again),

Barry Reville 
University of Guelph
Computing and Communications Services
breville@uoguelph.ca
www.uoguelph.ca/~breville


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

Date: Thu, 08 Jan 1998 10:04:28 -0600
From: Ken Holm <rets@meta3.com>
Subject: Complex Data Stucture
Message-Id: <34B4F90C.7DE1@meta3.com>

Following is a sample data structure:

%Hash = ("Ken" => [ "Holm", "Jackson", "MS", 27, "Web Weenie" ], 
         "Jo"  => [ "Smiff", "Juneau", "AK", 25, "Belly Dancer" ] );

If I want Jo's age, I can say:

$Age = $Hash{Jo}[3];

How do I get a list of all of those attributes associated with Jo?

That is:

@List = $Hash???  # = ( "Smiff", "Juneau", "AK", 25, "Belly Dancer" )

Ideas?

-K
-- 
Kennneth A Holm  |        META 3 - Webmaster        |webmaster@meta3.com
PO Box 1508      |----------------------------------|(601)948.3399 x 227
Jackson, MS 39215|PGP Key finger webmaster@meta3.com|(601)948.5999 (fax)


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

Date: 08 Jan 1998 17:11:23 -0700
From: speed@racer.cartoon.spam.address
Subject: Re: Complex Data Stucture
Message-Id: <yz2ra6i33ro.fsf@advtech.uswest.com>

### "Ken" == Ken Holm <rets@meta3.com> writes:
Ken> 
Ken> Following is a sample data structure:
Ken> %Hash = ("Ken" => [ "Holm", "Jackson", "MS", 27, "Web Weenie" ], 
Ken>          "Jo"  => [ "Smiff", "Juneau", "AK", 25, "Belly Dancer" ] );
Ken> 
Ken> If I want Jo's age, I can say:
Ken> 
Ken> $Age = $Hash{Jo}[3];
Ken> 
Ken> How do I get a list of all of those attributes associated with Jo?
Ken> 

@{$Hash{"Jo"}}

-- 
  Bruce W. Hoylman (303/541-6557) -- bhoylma@advtech.USWest.COM ._ 0  
   -     __0    Speaking for myself...        /\/\    /\       /  //\.
-  - - _-\<,_   "Please saw my legs off".    /~/~~\/\/~~\     '  \>> |
 -  __(_)/_(_)_____________________________/\ /    \ \/\ \________\\ `_


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

Date: Thu, 8 Jan 1998 15:26:02 -0800
From: "Shawn M. Nelson" <snelson2@home.com>
Subject: CRYPT()
Message-Id: <693nk5$3gc$1@ha2.rdc1.sdca.home.com>

I want to create my own CRYPT() function in Visual FoxPro that returns the
exact same results and the NCSA CRYPT() function.

Does anybody out there know the algorithim that the NCSA CRYPT() function
uses to encrypt a sting?

Please post the code if you can.

Thank you,
Shawn Nelson




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

Date: Thu, 8 Jan 1998 14:05:12 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: tchorzewska <mtchorze@srd.bt.co.uk>
Subject: Re: File Format Query
Message-Id: <Pine.GSO.3.96.980108140158.26818l-100000@user2.teleport.com>

On 8 Jan 1998, tchorzewska wrote:

> Is it possible to write from perl to a file in .xls format, 

Perl can work with _any_ file format. The real question is whether you
know the format of the file! :-) 

If there's a module which does what you want, it should be listed in
the module list on CPAN. If you don't find one to your liking, you're
welcome and encouraged to submit one! :-)  Hope this helps!

    http://www.perl.org/CPAN/
    http://www.perl.com/CPAN/

-- 
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, 08 Jan 1998 17:47:00 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: File Format Query
Message-Id: <comdog-ya02408000R0801981747000001@news.panix.com>
Keywords: from just another new york perl hacker

In article <Pine.GSO.3.96.980108140158.26818l-100000@user2.teleport.com>, Tom Phoenix <rootbeer@teleport.com> posted:

>On 8 Jan 1998, tchorzewska wrote:
>
>> Is it possible to write from perl to a file in .xls format, 
>
>Perl can work with _any_ file format. The real question is whether you
>know the format of the file! :-) 
>
>If there's a module which does what you want, it should be listed in
>the module list on CPAN. If you don't find one to your liking, you're
>welcome and encouraged to submit one! :-)  Hope this helps!

in this case, there might be sticky licensing arrangements and so on.
i had thought about releasing the GIF module that i created, but i 
didn't want to get in trouble with Unisys.  same thing with the 
possible PGP module idea that was flaoting around a few weeks ago.  i
seem to remember the same thoughts when i was considering a Excel
interface too.

not to discourage anyone from writing modules though - just be aware
that a lot of your favorite toys might be proprietary :(.

-- 
brian d foy                                  <comdog@computerdog.com>
sometimes uses Excel 4 (and likes it)


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

Date: Thu, 08 Jan 1998 15:22:35 -0700
From: "Mark S. Reibert" <reibert@mystech.com>
Subject: Re: How to Tar & unzip Perl mods on CPAN site on Win32?
Message-Id: <34B551AA.79D574E2@mystech.com>

Edward Morris, Jr. wrote:

> Is there a "tar -xvzf perlmod.tar" for Win NT???

Get WinZip (www.winzip.com). It handles .tar and .tar.gz files quite
nicely.

HTH
-----------------------------
   Mark S. Reibert, Ph.D.

  Mystech Associates, Inc.
  3233 East Brookwood Court
   Phoenix, Arizona 85044

    Tel: (602) 732-3752
    Fax: (602) 706-5120
 E-mail: reibert@mystech.com
-----------------------------




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

Date: Thu, 8 Jan 1998 19:03:34 -0500
From: "David & Kathleen Seidel" <seidel@bigfoot.com>
Subject: Re: How to Tar & unzip Perl mods on CPAN site on Win32?
Message-Id: <693pgp$3pe$1@news.monad.net>

Yes, and it's called WinZip (you can get it at www.winzip.com).

Edward Morris, Jr. wrote in message <34B53D7D.2CED@fast.net>...
>Is there a "tar -xvzf perlmod.tar" for Win NT???
>
>ed




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

Date: Fri, 09 Jan 1998 00:34:14 +0100
From: Dpto Marketing <mkt@emred.com>
Subject: I need help
Message-Id: <34B56276.C917D8AD@emred.com>

I am looking for a perl script for a Windows NT server that sets up
cookies passing user ID information to the visitors of my site every
time they visit my pages, so whenever they come back I know they have
already been there.
Does anybody know where can I get this kind of script? and if it is not
available, how much would it cost to write it?
I would appreciate any help you could offer, I have no idea at all of
Perl so I have to rely on experts like you
Thank you, and excuse if any of you think this is not the right place to
post a message from a perl ignorant.

Paco Lobo




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

Date: 8 Jan 1998 22:30:43 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: language
Message-Id: <693k2j$p89$2@comdyn.comdyn.com.au>

> Subject: Re: language

Please check the following URL for infomation on how to choose a good
subject line:

	http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

In article <68vqji$h5j$3@news00.btx.dtag.de>,
	mcom-handel@t-online.de (Hans M|ller) writes:
> This is a multi-part message in MIME format.

Please don't post multi-part messages. plain text is more than enough.
Everyone can read plain text, a lot of people will refuse to read your
post if it's HTML.

> I'm using a NT-Server and want to get the perl engine? 5.004_02. Where I =
> can find? Is "perl" freeware?. If not: what the costs are?

http://www.perl.com/ has all the answers to your questions.

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


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

Date: Thu, 08 Jan 1998 19:03:22 -0500
From: Larry D'Anna <ldanna@hotmail.com>
Subject: Re: language
Message-Id: <34B5694A.1DFE5392@hotmail.com>



Hans M|ller wrote:

>  I'm using a NT-Server and want to get the perl engine? 5.004_02.
> Where I can find? Is "perl" freeware?. If not: what the costs are? I
> hope you can help me.

Search for 'perl' on any web search utility.
You will find  http://www.perl.com/perl/.
All will be revealed.


---------------------------------------------------
|Democracy is the worst system of government. --
|Except for all the others
|               -Winston Churchill
---------------------------------------------------
Larry D'Anna                   "eschew obfuscation"




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

Date: 8 Jan 1998 22:37:10 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Markees
Message-Id: <693kem$p89$3@comdyn.comdyn.com.au>

In article <comdog-ya02408000R0701982100570001@news.panix.com>,
	comdog@computerdog.com (brian d foy) writes:
> In article <6910kl$er0$1@comdyn.comdyn.com.au>, mgjv@comdyn.com.au (Martien Verbruggen) posted:
> 
>>In article <34B38708.5515@ameritech.net>,
>>        Scott Vetter <svetter@ameritech.net> writes:
>>> 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.
>>
>>This cannot be done directly with perl. You might want to try this
>>with javascript. Check one of the newsgroups devoted to javascript,
>>and maybe www.gamelan.com.
> 
> perl can produce the javascript and the page in which it lives though :)

perl can even be used to generate C code for a Web server, compile it,
run it, create code for a cgi application that exports HTML that
contains JavaScript and a reference to a Java applet, which is
generated and compiled on the fly by the server, then start up some
browser, connect to the server, and display the page.

But.. the implementation of that is left to the reader, because it is
outside of the scope of this newsgroup :)

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd.       | cynical. It's perfectly easy to be
NSW, Australia                      | cynical.


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

Date: 8 Jan 1998 23:46:15 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: match weirdness - $_++ vs. $_ + 1
Message-Id: <693og7$c98$1@news.iastate.edu>

In poking about with the map operator, as below:

#!/usr/local/bin/perl

print "This is a test of the map operator.\n";

@a = 1..50;
map print("$_ "), @a;
print "\n";

@b = map ($_++, @a);

map {print "$_ "} @a;
print "\n";
map {print "$_ "} @b;
print "\n";

I get the following output:

/home/kortbein/perl% perl map.pl
This is a test of the map operator.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
28 29 30
 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

which is NOT what I expected. Replacing the map($_++, @a) with map($_ + 
1, @a) yields:

/home/kortbein/perl% perl map.pl
This is a test of the map operator.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
28 29 30
 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
28 29 30
 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
29 30 3
1 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

which IS what I expected.

What's the deal? The two calls to map seem to be equivalent, but 
apparently I'm not aware of some side effect of the ++ operator.

Ccs to mail greatly appreciated.

Josh

--

___________________________________________________________________________
"So, would you say it's about time for our viewers to... crack each others'
 heads open and feast on the goo inside?"
"Yes. Yes I would, Kent." 



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

Date: Wed, 07 Jan 1998 08:29:11 +0100
From: Richard Locke <Richard.Locke@sni.nl>
Subject: Re: Newbie: Problem with file handling under WindozeNT and UNIX
Message-Id: <34B32EC7.3960@sni.nl>

Hi me again,

I forgot to mention what the problem is. The problem occurs at this line

"         } elsif (($words{$somename} || "groucho") eq $someguess) {"

Under I run this under NT and use the name of 'fred' and enter the
correct secret word of 'camel', everything is fine. Under UNIX, when I
enter 'fred' and the secret word 'camel' I get the 'Wrong answer' string
and can only enter 'groucho' (which is the default secret word for names
other than richard, fred or barney) as the secret word.

I hope this makes things a bit clearer for anyone who may be able to
help.

Richard


Richard Locke wrote:

 ...
>         while (! good_word($name,$guess)) {
>                 print "Wrong, try again $name. What is the secret word? ";
>                 $guess = <STDIN>;
>                 chomp ($guess);
>         }
>         print "Good $name, you got it right.\n";
> }
> 
> ## Sub routines from here on down
> 
> sub init_words {
> 
 ...
> }
> 
> sub good_word {
 ...
> }
> 
 ...


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

Date: Wed, 07 Jan 1998 08:35:51 +0100
From: Richard Locke <Richard.Locke@sni.nl>
Subject: Re: Newbie: Problem with file handling under WindozeNT and UNIX
Message-Id: <34B33057.56C7@sni.nl>

Hi again,

I forgot to mention what the problem is. The problem occurs at this line

"         } elsif (($words{$somename} || "groucho") eq $someguess) {"

Under I run this under NT and use the name of 'fred' and enter the
correct secret word of 'camel', everything is fine. Under UNIX, when I
enter 'fred' and the secret word 'camel' I get the 'Wrong answer' string
and can only enter 'groucho' (which is the default secret word for names
other than richard, fred or barney) as the secret word.

I hope this makes things a bit clearer for anyone who may be able to
help.

Richard


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

Date: Thu, 08 Jan 1998 18:56:43 -0500
From: Larry D'Anna <ldanna@hotmail.com>
Subject: Re: Perl and Visual Basic?
Message-Id: <34B567BB.54374551@hotmail.com>



Bruce T. Smith wrote:

> Can anyone point to examples of using Perl from Visual Basic? I'm wondering
> how well
> VB for GUI and Perl for backend stuff would work.
>
> Thanks in advance!

I dunno about embedding perl in VB (It probably requires a C extension to
VB) but Perl/Tk is another option.  The latest binary release for win32 on
CPAN includes Tk so you should not have too much trouble installing it.

---------------------------------------------------
|Democracy is the worst system of government. --
|Except for all the others
|               -Winston Churchill
---------------------------------------------------
Larry D'Anna                   "eschew obfuscation"




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

Date: 8 Jan 1998 22:08:12 GMT
From: tfletche@pcocd2.intel.com (Terry Michael Fletcher - PCD ~)
Subject: Re: perl on 64 bit HP "merced" platform ??
Message-Id: <693ioc$qv3$1@news.fm.intel.com>

Richard L. England (richard_england@mentorg.com) so eloquently and verbosely pontificated:
> Has anyone here had any experience with the new 64 bit HP platform ( I
> believe it's code name is
> Tahoe) and porting/using perl thereon?

why would "merced" be called "tahoe"? :-)

tahoe is a test chip.  it is not merced, the HP/INTeL 64 bit processor.

I believe all it needs is a unix OS and C compiler first, then perl should run
fine on merced.

-- 
#!/usr/local/bin/perl -w
print   "J"                      ."u".        #    -- Terry Fletcher
        "s"    ."t".    " A",     "n"         # tfletche@pcocd2.intel.com
   .    "o"   ,""."".   "the",    "r ","P".   #  Views expressed....not
   "e"."rl"   ." Ha",   "c",''    .""  ."".   #  INTeL's....yadda yadda
      ""            ,   "k".      "e"  ."r"   #          yadda....



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

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

Kelley W Phillips <KIMANDKELLEY@prodigy.net> wrote:
> John Goor wrote in message <6923p6$fu8$1@ocsgw2.klm.nl>...
> >I want: 'sendmail for NT'?
>   You could use the Socket module, and use sockets to make
> a connection to the pop3 server (over port '110'), or if you already

Isn't POP3 just for reading mail? In any case it sounds like bad form
to assume a port number. Presumably NT has an equivilent to a Unix
/etc/services file. Using one of the existing mail packages rather than
writing your own is much preferable anyway.

Elijah
------
has never used the Post Office Protocol


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

Date: Thu, 08 Jan 1998 19:17:40 -0500
From: Larry D'Anna <ldanna@hotmail.com>
Subject: Re: Perl Question
Message-Id: <34B56CA4.314FBA3E@hotmail.com>

> Perl Question

You might want to think of a more informative subject line next time you
post.

Muhammad Siddiqui wrote:

> How do I create a process on some remote machine,

Telnet maybe?  This is pretty platform specific.

> that will sleep for most of the time (but checks for the arrival of a
> file - via ftp). On
> seeing that the file has arrived, wakes up, does some processing or
> execute some commands and then going back to sleep before deleting the
> newly arrived file.

Maybe you could put a hook in the FTP server somehow if it supports
that kind of stuff.  If not you could add that feature yourself (assuming
you have the source).  You could also have the script wake up
every so often to check if the file is there, but that is pretty ugly.

---------------------------------------------------
|Democracy is the worst system of government. --
|Except for all the others
|               -Winston Churchill
---------------------------------------------------
Larry D'Anna                   "eschew obfuscation"




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

Date: Thu, 08 Jan 1998 22:04:31 GMT
From: blair@mdb.net
Subject: Re: Perl to EXE
Message-Id: <34b54cb5.709225422@news.infi.net>

I don't know what program from demobuilder you saw but I got
perl2exe.exe and it works GREAT for me. Don't know what "TAR" file
your talking about either??

Try it...

http://www.demobuilder.com/perl2exe.htm

Skip


On 8 Jan 1998 20:45:54 GMT, Tom Christiansen <tchrist@mox.perl.com>
wrote:


>Yes, but it doesn't do what you think it does.  What good 
>is a tar file with the a.out and script bundled together,
>or at least the moral equivalent of the same?



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

Date: 08 Jan 1998 15:00:55 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Perl to EXE
Message-Id: <m3hg7e8taw.fsf@windlord.Stanford.EDU>

James Cherry <James.Cherry.0504266@nortel.ca> writes:

> Program's called "undump". Platform specific. use Perl -u to gen the
> core file, but you must have a specially linked version of perl or
> undump will not work on some platforms.

 ...like pretty much any operating system released within the last five
years.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 9 Jan 1998 10:53:31 +1100
From: greg@turing.une.edu.au (Greg Zevin)
Subject: Re: Perl to EXE
Message-Id: <693otr$mom@turing.une.edu.au>

blair@mdb.net writes:

>I don't know what program from demobuilder you saw but I got
>perl2exe.exe and it works GREAT for me. Don't know what "TAR" file
>your talking about either??

Well, perl2exe is nothing more than something like tar+perl run-time system.
It does the job, though, if you need to supply to the client an 'executable'
(non-batch) file.


Actually, we use it a lot, but it doesn't pick up 'required' files,
so I had to write a script which does it.

Has anyone experienced this problem?
E-mail replies will be appreciated.


Greg



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

Date: 8 Jan 1998 22:19:19 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Simple string length
Message-Id: <qz$9801081714@qz.little-neck.ny.us>

Geoffrey Conner  <geoffrey.conner@gsc.gte.com> wrote:
> Hi, I am new to Perl and am trying to do something similar to strlen in

Have you looked for "length" in perlfunc(1)?

Elijah
------
not that you couldn't do this in other ways as well



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

Date: 8 Jan 1998 23:22:42 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Simple string length
Message-Id: <693n42$pf1$1@comdyn.comdyn.com.au>

In article <34B52DAC.4770@gsc.gte.com>,
	Geoffrey Conner <geoffrey.conner@gsc.gte.com> writes:

> $count = ($string=~ tr/.//);

You might not want that. That counts all the dots in the string. You
might actually only want to know the number of digits, not the actual
string length (which the function length will give you). From the
perlop man page:

    $cnt = tr/0-9//;            # count the digits in $_

and combining it with the other examples:

    $cnt = $string =~ tr/0-9//; # count the digits in $string

HTH,
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: Thu, 8 Jan 1998 19:10:14 -0500
From: Glenn.W.Hoffman@ibm.net (Glenn W. Hoffman)
Subject: Re: Simple string length
Message-Id: <1d2jwkb.pnklw9lobji2N@slip166-72-108-227.ny.us.ibm.net>

And a slight refinement of this will yield you a 40% reduction in
processing time:

sub numlength ($) {
  return (my $temp = $_[0]) =~ tr/0-9//;
}

Glenn


Kevin Reid <kpreid@ibm.net> wrote:

> Geoffrey Conner <geoffrey.conner@gsc.gte.com> wrote:
> 
> > Hi, I am new to Perl and am trying to do something similar to strlen in
> > C.  I am going to read in a phone number from user input on a web page,
> > and by the length of digits determine if the phone number is internal,
> > or external.  I tried some things like:
> > $count = ($string=~ tr/.//);
> > but no luck there.  It sounds simple, but I must be overlooking
> > something.
> > 
> > Thanks in Advance
> > 
> > Geoff
> 
> Here's a solution that will ignore dashes:
> 
> #!perl -w
> 
> sub numlength ($) {
>   my $temp;
>   return ($temp = $_[0]) =~ s/\d//g;
> }
> 
> print numlength("1-800-555-1234"), "\n";


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

Date: Thu, 08 Jan 1998 16:56:02 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Tech writer lifts burden from programmers
Message-Id: <34B54B72.48C9@min.net>

Cliff High wrote:
> Bullshit.

Touched a nerve, did we?

> That is not used in refering to people or other 'personified'...
> Your simplistic view that the that use rules originate with...

Tsk. You should have placed the word "that" in quotes, to avoid
confustion.

> Your simplistic view that the that use rules originate with
> style guide authors betrays a lack of
> understanding of the grammar of the english language.

False.  Go back to Logic 101.

> That attitude (please note that we are not elevating the attitude
> to the state of humanity) also shows little understanding of the
> derivation of language and the influences upon it.

Perhaps.  But why should we trust someone (you) who can't even parse
this simple sentence?

"That attitude also shows little understanding . . ."
You seem to think that this occurence of "that" is illustrative
of your argument, when in fact it is completely unrelated.  
No one would suggest (no one proficient in English, that is) that
"who" could have been substituted for "that" here.  
Suppose we choose a different, more human noun:
"That author shows little understanding . . ." is still correct.

I notice you make a similar error later:
"We find that the view prevailing in the language . . ."
for you say "we are discovering a thing, not a person."
Clearly, in this case, "that" is the only valid word.  "This", "who",
and "which" are right out.  If were discovering a person, how
would you have changed the sentence?
"We find who the candidate prevailing in the elections . . ."?

And again:
". . . the view prevailing in the language is that anything thought
 to have a 'soul' . . ."
"That" is the only appropriate word, despite your scholarly 
interlineation: "note that 'anything' is a thing, in abstract".
 
> Much of the grammar of the English language was influenced by the
> german and french from which it is crafted.

Cut the bombast. English was not crafted, as I'm sure you know;
it evolved.  Maybe *your* knowledge of the history isn't so good
either.
Furthermore, the failure to capitalize the names of languages little
becomes one of such estimable linguistic fastidiousness.

> As these languages
> often had the heavy hand of religious autho[r]ities shaping their
> development

An unsubstantiated claim, and if true, supports your opponent's 
"rule by style guide" argument.

> . . . the view prevailing in the language is that anything thought
> to have a 'soul' or to be possessed of 'anima' which is to say,
> life, cannot properly be referenced with 'that'. Those things
> thought to be without such can quite properly be called, 'that'.

Put this in the past tense, and I might not bother arguing with you.

More to the point, you are regurgitating Style Guide rhetoric, 
whether you realize it or not.

> Of course my judgement of your knowledge of the English language as
> being truely abysmal might be misplaced.

Indeed.

And it's "truly", not "truely".

> All indications are that it is not your mother tongue.

And yet you still couldn't resist the urge to jump down his throat.

> If the clues of professed ignorance are correct, then I apologize.

A bit late, eh?

> English possesses a terrible learning curve for the new initiate.

FOG alert.

> Welcome to America.

"More pedantic assholes per household than most industrialized nations."

> Cliff
> Tenax Software Engineering
> chigh@vallier.com
> 360.866.1686


I did a search on the texts of various Bible translations for
occurences of any of the pronouns 
  he, they, him, them, she, her, you, ye, thou, thee
immediately followed by "that" or "who".

        that    who    year
KJV     2198     74    1611
ASV     2402    110    1901
Webster 2189    322    1833
Darby   1828    306    1890
Young    337    807    1898
RSV      327    904    1952

Clearly, the trend over the centuries has been away from "he that"
and toward "he who".  I believe this change was driven by pedants
who sought to regularize English.  King James' Bible committee had
no style guide; they wrote in a way that was natural to them.
Even with style guides, modern writers

Some samples from the KJV:

[Job 40:2] Shall he that contendeth with the Almighty instruct him?
 he that reproveth God, let him answer it.

[Isa 40:31] But they that wait upon the LORD shall renew their
 strength; they shall mount up with wings as eagles; they shall
 run, and not be weary; and they shall walk, and not faint.

[Mat 2:2] Saying, Where is he that is born King of the Jews?
 for we have seen his star in the east, and are come to worship him.

[Luke 1:45] And blessed is she that believed: for there shall be a
 performance of those things which were told her from the Lord.

[Rom 8:11] But if the Spirit of him that raised up Jesus from the
 dead dwell in you, he that raised up Christ from the dead shall
 also quicken your mortal bodies by his Spirit that dwelleth in you.

[Rev 21:5-6] And he that sat upon the throne said, Behold, I make
 all things new. And he said unto me, Write: for these words are
 true and faithful. And he said unto me, It is done. I am Alpha and
 Omega, the beginning and the end. I will give unto him that is
 athirst of the fountain of the water of life freely.

Credit goes to The Christian Center 
(http://www.geocities.com/Heartland/Acres/3964/)
for their Bible Translations browsing engine.

John Porter
jporter@logicon.com


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

Date: Thu, 8 Jan 1998 20:59:34 +0000
From: Craig Cockburn <craig@scot.demon.co.uk>
Subject: Re: Text->HTML script
Message-Id: <JkJ73UA24Tt0EwzQ@scot.demon.co.uk>

Ann an sgriobhainn <EMEvs6.Apw@discus.technion.ac.il>, sgriobh Raz Uri
<s2845543@techst02.technion.ac.il>
>
> I've written the script to HTMLize the FAQ I maintain [in text format], and
> thought some other people might find some use to it.
>
I have a similar tool at
http://www.scot.demon.co.uk/q-html.html which may be of interest to MS
Windows users.

-- 
Craig Cockburn ("coburn"), Du\n E/ideann, Alba. (Edinburgh, Scotland)
http://www.scot.demon.co.uk/           E-mail: craig@scot.demon.co.uk
Sgri\obh thugam 'sa Gha\idhlig ma 'se do thoil e.


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

Date: Thu, 08 Jan 1998 17:21:12 -0500
From: Larry D'Anna <ldanna@hotmail.com>
Subject: Re: Win32--Add to program to system tray or Hide while running/minimized
Message-Id: <34B55157.55354858@hotmail.com>



Deflores wrote:

> How can I hide a running perl program from the Windows NT taskbar or
> alternatively minimize it into the system tray?
>
> Thanks in advance,
>
> deflores

 Create a program in C to spawn the perl process, run that from the
command prompt.  Since perl is not going to create any windows it
will not appear on the taskbar.

---------------------------------------------------
|Democracy is the worst system of government. --
|Except for all the others
|               -Winston Churchill
---------------------------------------------------
Larry D'Anna                   "eschew obfuscation"




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

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

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