[12804] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 214 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 21 14:07:30 1999

Date: Wed, 21 Jul 1999 11:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 21 Jul 1999     Volume: 9 Number: 214

Today's topics:
        [ANNOUNCE] New module VcsTools::History and Puppet::Vcs <domi@barrayar.grenoble.hp.com>
        ANNOUNCE: Win32::File::Ver v.0.01 <blazer@mail.nevalink.ru>
        ANNOUNCE: WWW::Search 1.025 released! <mthurn@tasc.com>
        ANNOUNCEMENT: template merging module - Ptml 1.4 <malcolm.dewjones@moh.hnet.bc.ca>
    Re: Copying directories <cassell@mail.cor.epa.gov>
        Excel sheets <msingla@ford.com>
    Re: exec || system || ` ` ???Help <mail@netron.de>
        finding last created files in a directory stef790@my-deja.com
        FORMS parsing assistmanager@my-deja.com
    Re: FORMS parsing <mlopresti@bigfoot.com>
        Gtk::Dialogs 1.0-1 released <ac@gnu.org>
    Re: How should I sort by different fields? <cassell@mail.cor.epa.gov>
        How to get the names of the running processes <osman@focomedia.de>
    Re: How to give Passwords on STDIN <osman@focomedia.de>
    Re: I am looking for free flat db search script <factory@factory.co.kr>
    Re: Listing Files (Tad McClellan)
    Re: newbie question: how put files from dir in array (Filip M. Gieszczykiewicz)
    Re: Perl and MS Access DBs module <alain.borgo@ratp.fr>
    Re: Perl can't do ">>filename" -- geesh! (Bart Lateur)
        re: problem with <input type=image .......> <bobby@alpstreet.net>
        Question about POST (multipart/form-data) requests <zonemaster@mail.ru>
    Re: recursive anonymous functions -- problem <cassell@mail.cor.epa.gov>
    Re: Script doesn't always finish (Clinton Pierce)
        Server NT et Perl (Vincent Maugain)
    Re: Server NT et Perl <mail@netron.de>
        Stop parent but not child process <mail@netron.de>
    Re: Testing for the existing of a key in a hash <marshalc@americasm01.nt.com>
    Re: Web page generator <kperrier@blkbox.com>
        What Missing Part 2 <formula@idirect.com>
        Whats Missing? <formula@idirect.com>
        winpdfdata 1.1 <sanface@sanface.com>
        X500::DN V 1.13 <rpsavage@ozemail.com.au>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: 21 Jul 1999 17:55:04 GMT
From: Dominique Dumont <domi@barrayar.grenoble.hp.com>
Subject: [ANNOUNCE] New module VcsTools::History and Puppet::VcsTools::History
Message-Id: <7n51ho$b28$1@play.inetarena.com>


Hello

I'd like to announce the release of 2 new perl modules :
VcsTools::History and Puppet::VcsTools::History (both at version
1.001).

Here's an extract from the README of Puppet::VcsTools::History:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

This package provides a GUI to draw on a Canvas a revision tree which
is extracted automatically from the history log of any file archived
with a VCS system based on RCS.

The revision tree in the Canvas features key bindings to read the log
informations from the tree drawing.


This functionnality is available as a perl class
(Puppet::VcsTools::History) or as a script (viewHistory).

I'd like people who actually use this module for their application to
drop me a short note about what they're using this module for. 

Suggested DSLI line
Puppet::VcsTools::History bdpO  Vcs history viewer  DDUMONT

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
Here's an extract from the README of VcsTools::History:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This package contains functions to extract informations from the
history of a VCS file.

Generally, RCS based systems such as VCS or HMS store a few
information with each revision. These information are generally
'Author', 'date', 'branches', 'log'. On top of the common
informations, you can specify your own set of information (for
instance, 'merged from', 'bug fixed') according to the policies
defined on your work place.

You can perform various queries related to the history such as :

* Sort revisions: it will return a pair of revisions sorted by
age. Oldest and child. But it will return an error if these two
versions are not parents of each others.

* List a genealogy of versions between 2 revisions of a file. This will
take into account the branches. For instance between 1.1 and 1.2.1.2,
it will return 1.1 1.2 1.2.1.1 1.2.1.2), but between 1.3 and 1.2.1.2
it will return an error, since these two versions are not parents of
each others.

* Build a cumulated log of several revisions. I.e a log description of
all changes made to several consecutive versions (which is handy to
build a log of a merge). This function will return an if these two
versions are not parents of each others.

Suggested DSLI line:
VcsTools::History bdpO  Perl class to manage a VCS history   DDUMONT

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


These 2 modules results from a split of the old VcsTools modules. I've
tried to separate clearly the functional part (VcsTools::History) from
the GUI part (Puppet::VcsTools::History). 

These modules deal with the history part. I hope to release soon 2
others modules (functionnality and GUI) which will manage the file and
the VCS file and not only the history.

Share and enjoy.

-- 
Dominique_Dumont@grenoble.hp.com




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

Date: 21 Jul 1999 17:56:12 GMT
From: Mike Blazer <blazer@mail.nevalink.ru>
Subject: ANNOUNCE: Win32::File::Ver v.0.01
Message-Id: <7n51js$b2g$1@play.inetarena.com>

Hi guys,
I've just uploaded a new module to my site - Win32::File::Ver v.0.01

It extracts (al least tries to extract) version-info resource from
binary files, makes parsing and provides also a simple way to get
version-info right from the command line (ANSI or OEM encoding).


Enjoy!

Comments and additions are much appreciated as usual.
-- 
==================================
Mike Blazer
blazer@mail.nevalink.ru
http://www.dux.ru/guest/fno/perl/
==================================




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

Date: 21 Jul 1999 17:55:32 GMT
From: Kingpin <mthurn@tasc.com>
Subject: ANNOUNCE: WWW::Search 1.025 released!
Message-Id: <7n51ik$b29$1@play.inetarena.com>


WWW::Search 1.025 has been uploaded to CPAN as

authors/id/M/MT/MTHURN/WWW-Search-1.025.tar.gz

Look for it soon at your friendly neighborhood CPAN mirror!

Highlights of this release:

NEW backend for Excite News
NEW backend for AltaVista Intranet
FIXED Infoseek Companies and News searches
various minor tweaks and bugfixes

-- 
 - - Martin "Kingpin" Thurn                    mthurn@tasc.com
     Research Software Engineer           (703) 793-3700 x2651
     The Information Refinery              http://tir.tasc.com
     TASC, Inc.                            http://www.tasc.com

Great! Always thinking with your stomach. -- Han, Return of the Jedi




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

Date: 21 Jul 1999 17:53:52 GMT
From: Malcolm Dew-Jones <malcolm.dewjones@moh.hnet.bc.ca>
Subject: ANNOUNCEMENT: template merging module - Ptml 1.4
Message-Id: <7n51fg$ar1$1@play.inetarena.com>

ANNOUNCEMENT

(yet another) template merging module - Ptml 1.4

NAME

Ptml.pm

( I know that acronyms are verbotenish on CPAN but I need some 
short way to describe the files I use within projects.  PTML is 
what I have been using, at least for now. )

DESCRIPTION

Ptml.pm is a Perl module that merges data into templates using 
a simple but powerful "language" (if I may be so bold as to use 
that term) which I call PTML.

The language provides for document "sections" to allow multiple 
images in a single file, macros - varying levels of complexity 
possible from simple variable substitution to subroutine calls to 
complex (though short) perl code, loops (foreach, for, and while), 
formatting subroutines for more complex data display tasks such 
as layout of recursive data structures, and etc., plus complete 
examples of the available features.

AVAILABILITY

The module is available on CPAN.  You get it directly from my author's 
directory for now.

	http://www.cpan.org/authors/id/M/MD/MDEWJONES/

Suggestions on names and names spaces welcome.  I thought about 
Text::Template::Ptml, or Text::Merge::Ptml.  Any advice or suggestions?

CONTACT

My "real" address is 73312.2317@compuserve.com.  This message may have 
another address which should also be valid for at least a few months.




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

Date: Wed, 21 Jul 1999 10:19:15 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Copying directories
Message-Id: <37960113.DAD3B42E@mail.cor.epa.gov>

Kim Saunders wrote:
> 
> Hello again,
> 
> Can someone pls give me an example of how to copy DIRECTORIES recursively
> (ie a 'cp -r dir'). The File::Copy module only seems to do files, and I need
> to do directories portably

File::Copy also has a copydir() function which sounds dangerously
close to what you want.  Check it out and see if it helps.

HAND,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 20 Jul 1999 12:11:26 -0400
From: "Manmohan Singla" <msingla@ford.com>
Subject: Excel sheets
Message-Id: <7n26sb$l746@eccws1.dearborn.ford.com>

Hello ,
I am populating a Excel spreadsheet using Excel.pm. I have very big headings
so want to incorporate a word wrap . Also since it's a big sheet it spreads
across screen. So certail columns can't be seen without using scrollbar. So
i want to use the freezing column property
to freeze certain predetermined columns.  Is there any other way of going
around the problem.


Thanks for the help.


Manny




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

Date: Wed, 21 Jul 1999 19:06:55 +0200
From: Mike Eiringhaus <mail@netron.de>
Subject: Re: exec || system || ` ` ???Help
Message-Id: <3795FE2F.9F9F5306@netron.de>

Bob Freedman wrote:
> I am having trouble launching one perl program from another when I need
> to send it 3 arguments. I am trying to let the launched process finish
> on its own time while the original process continues. A snipet of code
> follows:
> 
> foreach (@detailURL) {
>   $sFile = "$cook\.$i\.sry";
>   push (@sum, $sFile);
>   $run = "perl httptest.pl|$_ $query $sFile";
>   system ("$run"); # I can get the httptest.pl to run but it only gets
>                    # one of the aruments
>   ++$i;
> }

Hi, I'am an absolutly newcomer but try the following and tell me the
result.

Good luck!

foreach (@dateiURL) {
  $sFile = "$cook\.$i\.sry";
  push (@sum, $sFile);
  $run = "perl httptest.pl|$_ $query $sFile";
  FORK: {
    if ($pid = fork) {
      push (@pids, $pid);
    } elsif (defined $pid) {
      exec ("$run");
    } elsif ($! =~ /No more process/) {     # By "Programming Perl"
O'Reilly
      sleep 5;
      redo FORK;
    } else {
      die "Cannot execute fork: $!\n";
    }
  }
}
# Wait for all Processes. Can executed later
foreach (@pids) {
  waitpid $_, 0;
}


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

Date: Wed, 21 Jul 1999 17:46:07 GMT
From: stef790@my-deja.com
Subject: finding last created files in a directory
Message-Id: <7n510r$2s5$1@nnrp1.deja.com>

Hi,

I would like to be able to read in a variable the
names of the five last created files in a given
directory containing hundreds of files, based on
the files creation dates.

What would be the most efficient strategy? Is
there a way to avoid to stat all the files?

Thanks for any help.

Stef


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Wed, 21 Jul 1999 16:55:19 GMT
From: assistmanager@my-deja.com
Subject: FORMS parsing
Message-Id: <7n4u1g$1f7$1@nnrp1.deja.com>

If someone could help me with the following that would be great..

i'd like to read in an html file and if it has a form in it..  out put
the action and all the name/values.. in some way that could be usefull
if i was to make something that would easily allow automated submission.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Wed, 21 Jul 1999 13:31:17 -0400
From: matt <mlopresti@bigfoot.com>
Subject: Re: FORMS parsing
Message-Id: <379603E5.A9C3F1E3@bigfoot.com>

Do you know the names of the input fileds?

assistmanager@my-deja.com wrote:

> If someone could help me with the following that would be great..
>
> i'd like to read in an html file and if it has a form in it..  out put
> the action and all the name/values.. in some way that could be usefull
> if i was to make something that would easily allow automated submission.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.






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

Date: 21 Jul 1999 17:54:04 GMT
From: Alistair Cunningham <ac@gnu.org>
Subject: Gtk::Dialogs 1.0-1 released
Message-Id: <7n51fs$ar8$1@play.inetarena.com>

Announcing the first stable version of Gtk::Dialogs!

Gtk::Dialogs is a simple and very easy to use Perl interface to create
dialog boxes using the Gtk toolkit for X. It requires no knowledge of
Gtk or advanced Perl features. Complex dialog boxes can be created in
just a few lines of code. Gtk::Dialogs has built in features for
validation of user input.

Get it from:

http://www.su-root.freeserve.co.uk/gtkdialogs/gtkdialogs_1.0-1.tar.gz

Happy Perl & Gtk hacking!


Alistair Cunningham.

-- 
---------------------------------------------------------------------------
  Alistair Cunningham   Email: ac@gnu.org   Telephone: +44 (0)1705 471044




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

Date: Wed, 21 Jul 1999 10:28:45 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How should I sort by different fields?
Message-Id: <3796034D.4B5845E7@mail.cor.epa.gov>

Floyd Morrissette wrote:
> 
> I think we are in agreement for the most part. One thing I would like to
> add is I know there are otherways to access usenet other than an
> internet connection or like you said they might bulk download. But I
> believe most new users of usenet are using the internet to use usenet.

You say this like it's a *good* thing.  :-)

> I don't mean to make assumptions. I just know that answers that are
> vague are not helpful at all. I don't ask many questions here myself
> because I can usually find the answer already posted here somewhere. But
> I have noticed I have to sort through a bunch of answers that either are
> very vague or do nothing but demean the person asking. I will usually
> find one person willing to answer the question with the proper detail
> and in a civilized way. Most seem put out that they even have to read
> the question.

That's where people like you come in.  People who still have the patience
to explain to new people where to find the FAQ and how to use it.
To explain why the new user should use -w and 'use strict' in a tone
that won't make him/her/it bite back.  To explain politely that this is
not a job forum or a search engine for free scripts, and to direct that
poster to a better place to search [although I don't know what will
happen when you try to help that guy from the 'adult entertainment biz'
and he offers you some 'Good Fun Company'.. :-].  To tell AOL'ers in
a nice way that TomC hates them just because they're posting from AOL.
To politely explain to WebTV people what will and will not run on a
WebTV NS [non-operating system]. 

> And you are right that we should put the faq on our hard drive. I have
> done that now that I know such a thing exists. Newbies don't know its
> there.

Yes, good, and 'fraid so.  Just having someone like you around who is 
willing to tell newbies this info is A Good Thing (tm, Martha Stewart).

HAND,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Wed, 21 Jul 1999 19:30:17 +0200
From: "osman durrani" <osman@focomedia.de>
Subject: How to get the names of the running processes
Message-Id: <3796005f.0@news.arcor-ip.de>

Hi,
 Does anyone know how i can get the complete list of the currently running
processes (if possible with pid no)  on my computer .
I am using Perl 5 under NT.

Thanx
Osman




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

Date: Wed, 21 Jul 1999 19:28:26 +0200
From: "osman durrani" <osman@focomedia.de>
Subject: Re: How to give Passwords on STDIN
Message-Id: <3795fff0.0@news.arcor-ip.de>


Tom Christiansen schrieb in Nachricht <3795dbe9@cs.colorado.edu>...
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, "Faisal Nasim" <swiftkid@bigfoot.com> writes:
>:: $passwd = <STDIN>;
>:Awesome! :P
>:My program's even easier (and shorter):
>:$passwd = <>;
>
>And less correct, since <> is not <STDIN> if @ARGV.
>
>--tom
>--
>"Aye, there's the rub...for in that sleep of death, what dreams may come
when
> we have shuffled off this mortal coil, must give us pause."
> - William Shakespeare, `Hamlet'

actually i wanted to know how can i get a password but not have the
passwaord visible on the STDIN.
This way you see the actuall password ,so it is not very good if you want to
keep your password secrete from prying eyes.

Thanx





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

Date: Thu, 22 Jul 1999 03:04:23 +0900
From: "Yeong Mo/Director Hana co." <factory@factory.co.kr>
Subject: Re: I am looking for free flat db search script
Message-Id: <7n51ho$nau$1@news1.kornet.net>

Thanks for your advice.

I'm trying to make a penpal script just for test.
So, I need a search script to add there.
It is better I get it from here so that to get others helpness.


David Cassell ÀÌ(°¡) <3795FDA7.C0160181@mail.cor.epa.gov> ¸Þ½ÃÁö¿¡¼­
ÀÛ¼ºÇÏ¿´½À´Ï´Ù...
>Yeong Mo/Director Hana co. wrote:
>>
>> Dear,
>
>Hmmpph.  I don't think you know me *that* well.  :-)
>
>> I am looking for free flat db search script
>> which has $ex0, $ex1, $ex2 variables for matching by select option,
>> and has divideing output paga to <1> <2> <3> ...function.
>
>Excuse me, but you have made a small error.  This is a newsgroup
>about programming in a particualr language.  It is not a source
>for free programs.  If you are looking for a script, rather than
>trying to write it yourself, you would have more success using
>one of the many search engines on the Web.  Alta Vista, Yahoo,
>ad nauseam.
>
>HAND,
>David
>--
>David Cassell, OAO                     cassell@mail.cor.epa.gov
>Senior computing specialist
>mathematical statistician




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

Date: Wed, 21 Jul 1999 04:52:39 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Listing Files
Message-Id: <no14n7.fi7.ln@magna.metronet.com>

Kevin M. Sproule (kmsproule@worldnet.att.net) wrote:
: Jonathan Stowe wrote in message <7n2mtk$1nh$1@gellyfish.btinternet.com>...

: >Of course as others have pointed out File::Find is by far the best way
: >to go but if you must do it yourself - you neednt waste so many keystrokes:

: Your example may work well on UNIX but the object here was to write
: something for WIN32.   The File::Find routine will walk the WIN32 file
: structure, but it returns "/"s instead of "\"s.


   How is that a problem?


: Most responders to posts
: seem to think that there is only one way to do it.


   I think in this case, it is more like:

      There is already a way to do it (that has been used by
      *thousands* of people, if there are bugs in there, they
      are likely to have been found and fixed already).


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


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

Date: 21 Jul 1999 17:15:08 GMT
From: fmgst+@pitt.edu (Filip M. Gieszczykiewicz)
Subject: Re: newbie question: how put files from dir in array
Message-Id: <7n4v6s$emv$1@usenet01.srv.cis.pitt.edu>

In Article <2rbim7.2kj.ln@magna.metronet.com>, through puissant locution, tadmc@metronet.com (Tad McClellan) soliloquized:
>iLs (iLs@cyberdude.com) wrote:
>: Hi, I'm just learning perl and wondering how I could put all the file names
>: of a certain dir. in an array ?
>: Can somebody show me an example ?
>
>   type
>      perldoc -f readdir
>   on a properly installed perl, and see the example given there.

Is there any _particular_ reason why no one recommended:

@files = glob("$DIR/$PATTERN");

??? I use this especially if I want a certain pattern, say
$PATTERN="*.[Hh][Tt][Mm]*"; then do a foreach $file (@files)...

Cheers,
Fil.
-- 
Filip "I'll buy a vowel" Gieszczykiewicz  |  http://www.repairfaq.org/

                   Always and everything for the better!
 Now exploring whatever, life, and the meaning of it all... and 'not' :-)


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

Date: Wed, 21 Jul 1999 19:10:23 +0100
From: Alain BORGO <alain.borgo@ratp.fr>
Subject: Re: Perl and MS Access DBs module
Message-Id: <37960D0F.213173AF@ratp.fr>

Hello,

Win32::OLE
Win32::ADO
Win32::ODBC
Win32::ASP

I think you will be happy !

Fredi Agolli a écrit:
> 
> Hi to everybody,
> I'm looking for Perl modules which manage MS Access Databases. May you give
> me some information about this?
> 
> Thank's in advance.
> 
> Fredi

-- 
A bientôt.
---------------------------------------------------------------------------------
Je ne suis pas sûr d'avoir raison mais je suis sûr d'avoir essayé
d'avoir raison.


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

Date: Wed, 21 Jul 1999 17:08:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl can't do ">>filename" -- geesh!
Message-Id: <3795fcc0.2683690@news.skynet.be>

wallewek@kmsi.net wrote:

>As I'm planning to have a lot of users running the same script at the
>same time, appending to the same log file, there is also the concern
>about simultaneous write access.  Using ">>filename" is about as close
>to an atomic operations as I'm likely to get.
>
>Am I missing something, or is this something perl just doesn't do
>well?

	use Fcntl qw(:flock);
	open(LOG,">>logfile"); # or die...
	flock LOG, LOCK_EX; # wait for exclusive access
	seek LOG, 2, 0; # append
	print LOG "Well this is $$ talking\n";
	close LOG; # This also unlocks it

I'm pretty sure this MUST be somewhere in the docs, as I sure as
anything did not invent this piece of code myself.

	Bart.


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

Date: Wed, 21 Jul 1999 18:33:12 +0100
From: bobby <bobby@alpstreet.net>
Subject: re: problem with <input type=image .......>
Message-Id: <37960458.E3B60354@alpstreet.net>

Hi,

	Would anyone be able to help me with this

From within a html page created from a script i have a submit button but
im using image instead of submit. ie:

<input type="image" src="/images/add.gif" name="add" value="add">

instead of:

<input type="submit" name="add" value="add"


	When i use the <input type="image" instead of <input type="submit" the
script just reprints the page im already on instead of taking me to the
"add" screen.

	Does anyone know why?

	thanks for any help

		bob


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

Date: Thu, 22 Jul 1999 00:14:27 +0600
From: Masterok <zonemaster@mail.ru>
Subject: Question about POST (multipart/form-data) requests
Message-Id: <37960E03.3C85@mail.ru>

Thank you if you're reading this. I hope you help me solve problem.
 
I have problem with sending POST (multipart/form-data) requests by using
HTTP
and LWP modules.

I need to send form like  this:(form's sent to another script which's
parsed it)
(I don't need parse it. My script must sends this form as browser.)

<form method="post" action="url" enctype="multipart/form-data">
<input type="text" name="name1" value="value1" >
<input type="text" name="name2" value="value2">
<textarea name="Body" rows=15 cols=79 >BODY</textarea>
<input type="submit" name="send" value=" Send It">
<input type="reset" value=" Clear ">
<input type="submit" name="draft" value="Save "></td>
<input type="checkbox" name="copy" value="yes"> 
<input type="file" name="File" size=40>
<input type="submit" name="attach" value="Attach file">

I read all docs about LWP and HTTP modules, but found only simple
example
at
http://www.activestate.com/activeperl/docs/lib/site/HTTP/Request/Common.html:
 POST 'http://www.perl.org/survey.cgi',
            Content_Type => 'form-data',
            Content      => [ name  => 'Gisle Aas',
                              email => 'gisle@aas.no',
                              gender => 'M',
                              born   => '1964',
                              init   => ["$ENV{HOME}/.profile"],
                            ]
but I didn't found how to send POST requests
with some "submit" buttons. 
How can I send information that I "press" Send
button or Draft button?
 
Sincerely yours,
John Smith.


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

Date: Wed, 21 Jul 1999 10:14:26 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Rachael Ludwick <raludwic@u.arizona.edu>
Subject: Re: recursive anonymous functions -- problem
Message-Id: <3795FFF2.1036B7E4@mail.cor.epa.gov>

[cc to poster, even though address is munged for fear of canned meat]

Rachael Ludwick wrote:
> 
> Ahh!!  Thanks!  I guess I do need to go back and read things again.

In your previous message you wrote that you couldn't find the
FAQ on the web.  Since you're using Perl, you should have the
FAQ (along with all the docs) locally.  If you have Perl on your
hard disk, you should have the docs there.  If it is on your
network, the docs should be accessible there as well.  Finding
these will make your life easier in future, so I urge you to
seek them out.  If they seem unavailable on your system, go to
CPAN [or ActiveState if you have a win32 system] and snag a copy.

No one should have to search as you did in order to find only
a 2-year-old copy of the Perl FAQ.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 20 Jul 1999 14:09:59 GMT
From: cpierce1@ford.com (Clinton Pierce)
Subject: Re: Script doesn't always finish
Message-Id: <37947ab4.935426642@news.ford.com>

[poster cc'd in e-mail]

On Tue, 20 Jul 1999 04:07:00 GMT, "Tiro Verus" <onecor@hotmail.com> wrote:
>while  ( defined (  $one = <> )) {
>    if ( defined (  $two = <> )) {
>         ; } else {   $two = "       \n"; }
>  chomp $one; chomp $two; 
>  print " $one $two \n";
> }
> [...]
>Does anyone know why?
>

Your problems are numerous.  First, when input from <> is taken from files
specified in @ARGV: if you try reading BEYOND the end of <> (the last read
returns undef, but you do it again anyway) STDIN will be used.  This is
clearly explained in the online manual "perldoc perlop".

And, there's a fundamental fault in your logic.  If the read into $two
fails, you don't take any steps to exit the program.  You simply loop up
and assume that the read into $one will fail also.  

And "if (cond) { ; } else { real_code; }" is bad form.   Use "unless
(cond) { real_code; }" instead.  That's what it's there for.

A quick re-write of your snippet yeilds:

while(defined $one=<>) {
	chomp $one;
	print $one;
	if ($.%2) {
		print "\n";
	}
}

Using $. has the added advantage of being able to paste any number of
lines together by just changing the "%2" without adding more logic.
Taking a moment for style and clarity, I get:

while(<>) {
	chomp;
	print "\n" if ($.%2);
	print;
}

Tightening it up just a bit more:

while(<>) {
	chomp if ($.%2);
	print;
}

The trailing newline left as an exercise for the reader.



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

Date: Wed, 21 Jul 1999 14:56:18 GMT
From: V_Maugain@mail.dotcom.fr (Vincent Maugain)
Subject: Server NT et Perl
Message-Id: <3795dc8e.1661616@news.club-internet.fr>

I try to work on a server NT and when I start my form, my navigator
puts me the source of my file offre_cgi.pl

You can see my appliacation at this address
This my file : http://www.aeseo.com/offres/offre_cgi.html
<FORM ACTION="http://www.aeseo.com/cgi-bin/offre_cgi.pl" METHOD="get"
enctype="application/x-www-form-urlencoded">

and my program Perl :
#! c:\perl\bin\
print "Content-Type: text/html\n\n";
print "toto\n";

Thanks,

Vincent.


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

Date: Wed, 21 Jul 1999 19:47:31 +0200
From: Mike Eiringhaus <mail@netron.de>
Subject: Re: Server NT et Perl
Message-Id: <379607B3.A02113CD@netron.de>

Vincent Maugain wrote:
> I try to work on a server NT and when I start my form, my navigator
> puts me the source of my file offre_cgi.pl

> and my program Perl :
> #! c:\perl\bin\
> print "Content-Type: text/html\n\n";
> print "toto\n";

I think that you must configurate your Webserver to execute files with
the extention .pl whit the Perl program. 

It's also possible that the directory witch includes the executeable
files must be configurated like this.

Tell me about the Webserver to give more help!

Mike Eiringhaus


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

Date: Wed, 21 Jul 1999 19:16:53 +0200
From: Mike Eiringhaus <mail@netron.de>
Subject: Stop parent but not child process
Message-Id: <37960085.1A0207EA@netron.de>

Hi!

I want to start a CD writing over the WWW Browser. So the Perl Program
must send an execution message and terminate displaying to the STDOUT.

The childprocess (i.e. cdrecord) must write the CD over 45 minutes and
then terminates after sending en Email to the admin.

I have tryed exec and qx/... &/ but it doesnt work.

Thanks for every help.
Mike Eiringhaus


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

Date: Wed, 21 Jul 1999 12:10:36 -0500
From: Marshall Culpepper <marshalc@americasm01.nt.com>
Subject: Re: Testing for the existing of a key in a hash
Message-Id: <3795FF0C.A20BDD51@americasm01.nt.com>

Uri Guttman wrote:

> >>>>> "MC" == Marshall Culpepper <marshalc@americasm01.nt.com> writes:
>
>   MC> Bruno Pagis wrote:
>   >> Is there a better way than
>   >> if ($hash{$key} eq ".")
>   >> to know that a key has no entry in a hash ?
>   >> I figured out that when a key does not exist, I get a dot returned for
>   >> the value, but I'm not even sure that it is "standard".
>   >>
>   >> BRUNO.
>
>   MC> this may be what you're looking for:
>   MC> if !defined($hash{$key})
>
> try it on this hash:
>
>         %hash = ( a => undef ) ;
>
> is the key 'a' in that hash? what does this return?
>
>         defined( $hash{a} )
>
> answer: there is a better function to see if a key exists.
>
>

i guess you're referring to the exists function.....thanks for the pointer Uri

~Marshall

------
Homer: No beer No TV make Homer  something something
Marge: go crazy?
Homer: Don't mind if i do!



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

Date: 21 Jul 1999 12:04:30 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Web page generator
Message-Id: <0EECC14AD15CE259.D9D118824C3F338C.0B76D88E2A1A6B0E@lp.airnews.net>

rook268@my-deja.com writes:

> Here's the situation.  My site is getting set to launch a new design.
> We'd like to have something on the front page that would show events
> that are happening today that would be updated automatically.  SSI is
> not an option, as is mod_perl and anything using python (Zope, HTMLGen).
> 
> Is there a program that does this?  I'm prepared to write this myself,
> but if someone has made it already I'd rather give that a try.

What does this have to do with perl?  Perhaps you should ask in a newsgroup
that deals with your webserver (which you didn't bother to tell us what it
is).

Kent


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

Date: Wed, 21 Jul 1999 13:49:49 -0400
From: William S <formula@idirect.com>
Subject: What Missing Part 2
Message-Id: <3796083D.E9EF8739@idirect.com>

This is the code for the html document that calls up a form that allows
you to browse your hardrive, select a picture file and transfer it to an

perl script in a cgi-bin that processes it to the ftp server . It is
suppose to return a success page if all goes well. This perl script
below works fine in netscape 5.1 but sends back the page that says
unsuccessful in IE5.0 and the file never makes it to the ftp server.
What does netscape have that IE5.0 dosn't? I am using the "put" command
to send the file info to ftp.pl .It is suppose to grab those variables
and process them to the ftp server.

Any suggestions on this would be greatly appreciated

Thank-you in advance

William Stevenson.

THE HTML CODE IN THE WEBPAGE BELOW

<form ACTION="http://www.gatewayreproductions.com/cgi-bin/ftp.pl"
METHOD="put" ENCTYPE="multipart/form-data">
      <p>Filename:<br>

      <input NAME="file" TYPE="file"><br>
      <input TYPE="submit"> </font></p>
    </form>


THE PERL SCRIPT (FTP.PL) BELOW

#!/usr/bin/perl
# the above line must be the entire path to where perl resides on
# the WEB server.
#
# This perl script expects to be run thusly:
# % ftp.pl ftp_hostname userid password path/filename


# where ftp_hostname is the name of the ftp server to transfer to,
# userid is the username that is used to connect to the ftp server,
# password is the password for the userid on the ftp server,
# and path/filename is the entire path and filename of the file to
transfer


# import the CPAN file "FTP.pm" for use in this script
#
use Net::FTP;
use CGI;

$query = new CGI;

# Grab/set appropriate variables
$file = $query->param('file');

# chop everything out except the filename
@win_array = split (/\\/,$file);
@unix_array = split(/\//,$file);

$hostname = "ftp.easyhosting.com";
$username = "xxxxx";
$password = "xxxxx";
$success_page =
"http://www.gatewayreproductions.com/ftp/yoursuccesspage.html";
$failure_page =
"http://www.gatewayreproductions.com/ftp/yourfailpage.html";



# YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW THIS LINE
# ALL OF THE CONTROLLING VALUES FOR THIS SCRIPT ARE ABOVE HERE
# ----------------------------------------------------------

$rc = $ftp = Net::FTP->new("$hostname");
# attempt to login using the userid and password. ARGV[1] is the
# userid while ARGV[2] is the password
#
$rc = $ftp->login($username, $password);

# ensure that ftp uses BINARY to transfer the file
$rc = $ftp->binary();

# attemp to upload the file using the 'put' command, ARGV[3] is the
# file name
#
$save_file = $win_array[-1];
$rc = $ftp->put($file,$save_file);
if (!$rc) {
 $save_file = $unix_array[-1];
 $rc = $ftp->put($file,$save_file);
}

# disconnect from the ftp server to ensure a clean session
if($rc) {
 print "Location: $success_page\n\n";
} else {
 print "Location: $failure_page\n\n";
}

exit;



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

Date: Wed, 21 Jul 1999 13:47:38 -0400
From: William S <formula@idirect.com>
Subject: Whats Missing?
Message-Id: <379607BA.33B7127A@idirect.com>

This is the code for the html document that calls up a form that allows
you to browse your hardrive, select a picture file and transfer it to an

perl script in a cgi-bin that processes it to the ftp server . It is
suppose to return a success page if all goes well. This perl script
below works fine in netscape 5.1 but sends back the page that says
unsuccessful in IE5.0 and the file never makes it to the ftp server.
What does netscape have that IE5.0 dosn't? I am using the "put" command
to send the file info to ftp.pl .It is suppose to grab those variables
and process them to the ftp server.

Any suggestions on this would be greatly appreciated

Thank-you in advance

William Stevenson.

THE HTML CODE IN THE WEBPAGE BELOW

<form ACTION="http://www.gatewayreproductions.com/cgi-bin/ftp.pl"
METHOD="put" ENCTYPE="multipart/form-data">
      <p>Filename:<br>

      <input NAME="file" TYPE="file"><br>
      <input TYPE="submit"> </font></p>
    </form>


THE PERL SCRIPT (FTP.PL) BELOW

#!/usr/bin/perl
# the above line must be the entire path to where perl resides on
# the WEB server.
#



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

Date: 21 Jul 1999 17:54:39 GMT
From: SANFACE Software <sanface@sanface.com>
Subject: winpdfdata 1.1
Message-Id: <7n51gv$ar9$1@play.inetarena.com>

WinPDFdata 1.1 is a free PERL/Tk application that allows you to extract
information from PDF files (via our module PDFlib) and allows you to
generate an HTML file based on the extracted data.
Inside the zip distribution you can find also a Windows executable that
doesn't need the PERL installation and the PERL modules installation (Tk
and PDFlib).
WinPDFdata supports the new PDF version 1.3.
>From version 1.1, the executable doesn't need perlcrt.dll

We put winpdfdata-1.1.tar.gz and wpdfd11.zip at PAUSE inside the new
user sanface.
We don't know when you can find them at CPAN.

We know, the software is very simple.
Don't hesitate to send us your suggestions and patches.

--
SANFACE Software
http://www.sanface.com
mailto:sanface@sanface.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

Date: 21 Jul 1999 17:54:53 GMT
From: "Pen and Ron Savage" <rpsavage@ozemail.com.au>
Subject: X500::DN V 1.13
Message-Id: <7n51hd$b21$1@play.inetarena.com>

Name:

X500::DN::Parser.pm - Parse X500 Distinguished Names

Note:

The Perl module X500::DN V 1.13 is now on CPAN,
and on my web site
http://www.savage.net.au/

Recent changes:
1.13 26-May-99
--------------
o Ensure POD survives buggy pod2man
o Ship Readme.txt, the output of pod2text
o Combine old test.pl with code which reads X500DN.dat from DFA::Command.
   You do not need DFA::Command

1.12 19-Apr-99
--------------
o Patch Makefile.PL to support ActivePel's ppm.



--
Cheers
ron@savage.net.au
pen@savage.net.au
http://savage.net.au/





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

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

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 V9 Issue 214
*************************************


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