[8297] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1913 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 17 00:11:01 1998

Date: Mon, 16 Feb 98 21:00:38 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 16 Feb 1998     Volume: 8 Number: 1913

Today's topics:
        "undef"  and  Inititializing .. <vlierd@uni-oldenburg.de>
    Re: .rc file parser, anyone? <tchrist@mox.perl.com>
    Re: ? Regular Expressions ? <Sparks@Sourceworks.com>
    Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's et (Nathan V. Patwardhan)
    Re: CGI, PERL help needed in South Florida <keithmur@mindspring.com>
        Compilation problems with SunOS 4.1.3 (Markus Mertinat)
    Re: Creating Arrays from a file of names <rjk@coos.dartmouth.edu>
    Re: Date validation <xxTony.Curtis@vcpc.univie.ac.at>
    Re: determing integer or string. <tchrist@mox.perl.com>
    Re: Expand hash elements in string? <c..bojswbo@71.usenet.us.com>
    Re: FAQless Forays (was: Code Example Needed) <rra@stanford.edu>
        IIS3 : Problem with system command DIR in cgi-script <marion.gravel@pcm.bosch.de>
    Re: Interpeter For The PC (Andrew M. Langmead)
        More than one way to do it (was VB5: Win95 sound volume <camerond@mail.uca.edu>
        Newbie question <afuller@cisco.com>
    Re: non-polling way to detect new files? (Martien Verbruggen)
        non-terminating perl scripts (Chris Brinegar)
    Re: non-terminating perl scripts <beans@bedford.net>
    Re: on reading FAQs and gurus answering questions (MJ Lee)
    Re: Perl on IIS4 <keefner@kinetic.com>
        perlshop with cybercash airpix@hotmail.com
        PGP - Perl puzzle <iggiebee@rhpworld.org>
        Q: are line breaks disallowed in pod formatting command (Kevin B Cohen)
    Re: Q: Storing complex records in DBM files <tchrist@mox.perl.com>
        Replace in HTML files (Oleg Melnikov)
        Resselers Wanted! philexhosting@mailcity.com
    Re: Running DOS commands in PERL script??? (Jonathan Feinberg)
    Re: Running DOS commands in PERL script??? (Martien Verbruggen)
        Sending mail from perl (was Re: Newbie question) (Hunter Johnson)
    Re: So what about last summer's RFD?  Let's go moderate (John Stanley)
    Re: Sort help please! <joseph@5sigma.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 16 Feb 1998 16:31:38 +0100
From: Claus van de Vlierd <vlierd@uni-oldenburg.de>
Subject: "undef"  and  Inititializing ..
Message-Id: <34E85BDA.861EDDEC@uni-oldenburg.de>

if I say


 "undef $x;"  -- may I safely assume 
 that after "$x = $x +3;"

  $x contains "3"  and after 
 
  $x = "abc";

  $x contains  "abc"  ?!


 In other words :


  is a Variable always initialized 
  with  Zero (as a number)  and with  ""   as a string ?!?


 regards ,

claus van de Vlierd


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

Date: 16 Feb 1998 13:18:43 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: .rc file parser, anyone?
Message-Id: <6c9ebj$nk5$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    mist@yoyo.cc.monash.edu.au (Michael Stillwell) writes:
:Also, is there any way to get away with writing 'my $foo = "bar";' in
:p1?  I'd like to include the "my" there, for consistency.

Absolutely not.  my declares local variables, which in this case,
is the scope of the file you're requiring, "p1".  

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

    Be consistent.
            --Larry Wall in the perl man page 


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

Date: Mon, 16 Feb 1998 11:03:13 -0500
From: Bob Sparks <Sparks@Sourceworks.com>
Subject: Re: ? Regular Expressions ?
Message-Id: <34E86340.7136284C@Sourceworks.com>



Tom wrote:

>  Telnet? Telnet?? What in the name of Dennis does telnet have to ...etc
>
> All Perl distributions come with complete manpages... blah blah blah.

First of all Man is a most antiquated method of providing documentation. How
can the perl community advance if they waste so much time wrestling with
their tools. Telling some one to read a man page is a little like child abuse
in that you are more likely to do it if you have had it done to you.

At home I have a lovely awk, yes awk, script man2html, that at least puts the
man into a semi up todate interface. At work I don't have the web server to
run the cgi script so a have the perldocs in one big html document. You will
never use man pages again once you are set up properly.

A decent perl version of man2html would cross reference the text and have a
hot linked index. Examples would be available for down load. Not to mention a
search engine with some logic. The man thing is it would have option of
saving the processing to disk to a web server would not be required.

But I guess perl programmers are too busy trying to out do each other with
clever with regexp than to be clever at making their life easier. Work Harder
NOT smarter seems to be their motto.

The stubborn insistence that we all use the archaic man pages while we
provide point and click interface to our clients is indeed very ironic.

To all the RFM posters we are sorry your dad beat you as a child try some of
the alt.abuse groups to vent your self. Use that incredible talent of yours
to provide clever tools to help the challenged newbie.







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

Date: 16 Feb 1998 14:49:38 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's etc.: a teacher's perspective...]
Message-Id: <6c9jm2$6v2@fridge.shore.net>

Jaime Metcher (metcher@spider.herston.uq.edu.au) wrote:

: Firstly, newcomers may not know what RTFM means.  Replying in jargon to
: a plea for help from someone who may be already overwhelmed with
: tech-talk could be read as sadistic.

I believe that perusing the news.announce newsgroups will elucidate
this.

: Secondly, as it was explained to me, the "F" stands for a particularly
: aggressive word and carries an implied "you moron" or worse - although,
: as with most acronyms, there is more than one expansion.

The 'F', as it were, can mean just about anything that you want it to:
- freakin'
- freaking
- fargin'
- the offensive word
- flippin
- etc etc etc

But RTFM has been around much longer than you (and probably me), and
it's there for good reason, so I wouldn't assume that it's going to
disappear anytime soon.

I believe that RTFM was brought to you by the same MIT folks who
brought you IHTFP and others.  My understanding is that it's a DIY
phrase coined in jest -- but will all jest, there's a degree of truth.

: This might be an appropriate place to cast my vote for Tom Phoenix for
: the "c.l.p.m Timely, Helpful Information - Nice Guy of the Year" award

Tom's more of an Iron Man.  I've not ever met another person with such
stamina.  Haven't really seen him around lately, but he might be
resting his hands or something.

--
Nathan V. Patwardhan
please don't send spam to president@whitehouse.gov


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

Date: Mon, 16 Feb 1998 17:45:50 -0600
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: CGI, PERL help needed in South Florida
Message-Id: <34E8CFAE.31924396@mindspring.com>

If a beach is involved, I don't think Tom Christiansen is going down
there!  :-)

Mike Hensley wrote:
> 
> Pardon the intrusion, but do you know of anybody that is looking for a new
> job in the South Florida area?
> If you do, then please have them contact me.  I have requirements for
> CGI , PERL programmers in South Florida.
> 
> Mike Hensley
> e-mail: mhensley@silcoinc.com


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

Date: 16 Feb 1998 18:38:54 GMT
From: markus@phsun0.Physik.Uni-Augsburg.DE (Markus Mertinat)
Subject: Compilation problems with SunOS 4.1.3
Message-Id: <6ca13u$pim$1@sparcserver.lrz-muenchen.de>

Hello,

I tried to compile perl 5.004_04 on my Sun (SunOS 4.1.3) using 
gcc ver. 2.7.2.2 or the SUN-cc and always get the same error:

`sh  cflags libperl.a hv.o`  hv.c
          CCCMD =  gcc -DPERL_CORE -c -I/usr/local/include -DANSI_C -O   
hv.c: In function `save_hek':
hv.c:66: parse error before `HEK'
hv.c:66: parse error before `)'
hv.c: In function `Perl_hv_fetch_ent':
hv.c:177: parse error before `HEK'
hv.c:177: parse error before `)'
hv.c: In function `Perl_hv_iternext':
hv.c:917: parse error before `HEK'
hv.c:917: parse error before `)'
make: *** [hv.o] Error 1

Does anyone know this error? Please tell me the reason.

Thank you in advance,
                     Markus Mertinat


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

Date: Mon, 16 Feb 1998 19:34:15 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Creating Arrays from a file of names
Message-Id: <34E8DB0C.789E0BF7@coos.dartmouth.edu>

Holly Sommer wrote:
> 
> $i = 0;
> foreach $host (@hosts) {
>    if ( $i < 10 ) {
>       print STDOUT "$host ";
>       $i++;
>    } else {
>       print STDOUT "$host\n";
>       $i = 0;
>    }
> }

A more compact way to do it:

$i = 0;
foreach $host (@hosts) {
  print $host, ((++$i % 10) ? ' ' : "\n");
}

Chipmunk


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

Date: 16 Feb 1998 18:56:03 +0100
From: Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at>
To: stan@thunder.temple.edu
Subject: Re: Date validation
Message-Id: <7xoh07qvrg.fsf@beavis.vcpc.univie.ac.at>

Re: Date validation, Stan <stan@thunder.temple.edu> said:

Stan> Hello Perl Wizzards: I am trying to write a date
                 ^^^^^^^
Aha, a Pratchett reader?

Stan> validation routine in Perl on a Unix box. The date is
Stan> to be entered on a terminal in response to a
Stan> prompt. The date is stored as a string in the format
Stan> mm/dd/yyyy. When I try to make sure that "mm" is in
Stan> the range 01 to 12, I run into a problem, perhaps the

There be a module or two for this (of course)

    Date::DateCalc
    Date::Manip

hth
tony


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

Date: 16 Feb 1998 23:51:43 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: determing integer or string.
Message-Id: <6cajef$bh3$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, ucs_rat <ucs_rat@shsu.edu> writes:
:I am new to perl and have to would like to write a program that checks
:for a var holding a digit or character....  Would anyone have any
:examples...

The perldata manpage talks about this.  So does the perlfaq4 manpage.
They are on your system (assuming 5.004 of better).  Find them.
Read them.  Love them.

But please don't post FAQs.

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


Sockets are the X windows of IO interfaces.  --Rob Pike


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

Date: 17 Feb 1998 00:46:03 GMT
From: Anirvan Chatterjee <c..bojswbo@71.usenet.us.com>
Subject: Re: Expand hash elements in string?
Message-Id: <6camkb$lq4$1@samba.rahul.net>

Rick Freeman <rick@marinweb.com> wrote:
> I've tried many things that seemed logical to me, but none worked.
> (No, I won't show you what I tried, cause I don't want to look silly,
> but I did add {} to the \w+.
> Am I missing something simple, or is this just something that can't be
> done?

Perl does variable interpolation just fine as it is. Why rebuild the
wheel? I suggest using eval to have perl evaluate that as an
interpolated string.

> $text = 'this has a $foo{bar} in it';

My first inclination would be to do something like

	$interpolated = eval qq("$text");

The problem with doing this is that the eval will fail if $TEXT
contains a character matching the quote character (e.g. in this
example, if $text contained a " (double-quote) char somewhere in
there).

A slightly different approach might use a here-is. Using an obscure
here-is indicator will ensure low chances of collision with the body
of $text.

	$interpolated = eval "<<END_OF_TEXT;\n$TEXT\nEND_OF_TEXT\n";
	chop $interpolated;

But there *has* to be a cleaner way of doing this. Suggestions,
anyone?

_____________________________________________________________________
Anirvan Chatterjee  . anirvan @ chatterjee.net .  PGP 2048/0xE2D13BA9
Fast & free new/used multi-bookstore searching @ http://www.mxbf.com/


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

Date: 15 Feb 1998 20:17:58 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <m3lnvckwsp.fsf@windlord.Stanford.EDU>

uri <uri@sysarch.com> writes:

> my take is i never assign in a declaration in perl (or C)(except for @_
> in a sub). i have always separated them since i think of them as
> different operations.

You may or may not discover one day that you won't always have that
luxury.  I know of no way good way of duplicating the functionality of:

        local %hash = %hash;

without being unnecessarily baroque.  The assignment is exactly what you
want.

-- 
#!/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: Mon, 16 Feb 1998 12:45:37 +0100
From: "Marion Gravel" <marion.gravel@pcm.bosch.de>
Subject: IIS3 : Problem with system command DIR in cgi-script
Message-Id: <6c98je$lsm$1@news.fr.internet.bosch.de>

Hello

I try to get Perl 5.003 installed on a windows NT server
with IIS 3.0a.
First I downloaded the files :
 - Pw32i315.exe
 - Pw32s315.zip
I extracted them and ran the script perlw32-install.bat
and got the following install.log :

Thu Feb 12 15:11:39 CET 1998
Installing Perl for Win32 into F:\Perl
Added key to HKEY_LOCAL_MACHINE\SOFTWARE\ActiveWare\Perl5 ..
Key exists already, modifying existing key...
Adding F:\Perl\bin to script path information
Adding F:\Perl\lib to library include path information
Retrieving Path information from session manager
Updated path information in session manager
Associating .pl extension with Perl.exe.
Added CreateProcessWithNewConsole value for IIS
Perl 5.003 installation finished.

I have a CGI-Script installed in the CGI-directory.
I try to run the following script with Internet Explorer 4:

print "Content-type: text/html\n\n";
$server_dir="F:\\inetpub\\ibsftp\\tk\\ibs\\infos\\*.*";
print $server_dir;
@dateien = `dir $server_dir`;
print @dateien;

The script works fine, but the array @dateien is empty,
but the $server_dir isn't empty.

Does anyone know about that problems with system
commands and can help to solve it ?


Marion Gravel
marion.gravel@pcm.bosch.de





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

Date: Mon, 16 Feb 1998 14:54:35 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Interpeter For The PC
Message-Id: <EoH82z.Mrw@world.std.com>

Chris Schoenfeld <chris@ixlabs.com> writes:

>You will need to install a webserver on your PC - I don't know of any
>free ones offhand but I know there are some fine ones which do exist.

You do not need a HTTP server to run perl scripts on Windows. Even
ones that implement the CGI protocol.

You can use the "offline mode", if you use the CGI.pm module.

You can set whatever environment variables, command line arguments,
and other input that the HTTP server would.

Both of these methods have the advantage that you can use the perl
debugger on your code.

-- 
Andrew Langmead


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

Date: Mon, 16 Feb 1998 07:56:03 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: More than one way to do it (was VB5: Win95 sound volume control)
Message-Id: <34E84573.58C39D81@mail.uca.edu>

Just because I thought the original reply wouldn't be seen by more than
4 people on this NG:

Thijs Kinkhorst wrote:
> 
> Hello,
> 
> I'm having some questions on manipulating the Windows sound output.

Unususal question for a perl newsgroup, but in the interest of being as
helpful as possible, I suggest you try this:

#/usr/bin/perl -w -satire

Stand up;
Walk over to window;
Unlock;
if (window eq "casement"){
        turn crank to 'open' to increase volume ||
        turn crank to 'close' to decrease volume;
}
elsif (window eq "double-hung"){
        lift window to increase volume ||
        lower window to decrease volume;
}
else {
        hit window sharply with hammer to increase volume ||
        purchase new window to decrease volume;
}
Return to chair;
Leave us alone;

Cameron
camerond@mail.uca.edu


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

Date: Mon, 16 Feb 1998 00:43:43 +0000
From: "Adam H. Fuller" <afuller@cisco.com>
Subject: Newbie question
Message-Id: <34E78BBF.5CED@cisco.com>

I'm just learning perl, so if this is a really easy question, please
don't flame me too bad.
	I need to know how to use perl to send email.  Can the perl script do
the emailing, or would it be easier to have perl invoke a UNIX command
or something?  Here's what I'm trying to do:
	I've got a UNIX script pinging about 20 computers in a network and
saving the results to a file.  I use a really short perl script to sort
through that file to find the nonresponsive computers.  This is where I
need help:  I want the script to email my beeper the "no answer from
blah.blah.blah".  I've got everything set to work off a cron job so
it'll be running continuously throughout the day.
	Any help would be greatly appreciated since it'll be saving me a ton of
time.

adam


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

Date: 16 Feb 1998 22:43:32 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: non-polling way to detect new files?
Message-Id: <6cafek$4g2$10@comdyn.comdyn.com.au>

In article <34E88DA6.DDBC5D59@san.rr.com>,
	George Lippert <glipper1@san.rr.com> writes:
> Is there a way to detect when a new file is placed into a directory,
> other than, say, looping on the directory's modification time and then
> comparing new vs. old filename lists? I guess I'm hoping there is
> something like a directory version of select(). Thanks in advance.

Not as far as I know. You'll just have to check now and again. Of
course, you'll also have to make sure that if you're going to do
something to that new file, that that new file actually is complete.
If you, for example, move it somewhere else, while some process is
still writing to it, you get into problems.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Inside every anarchy lurks an old boy
Commercial Dynamics Pty. Ltd.       | network - Mitchell Kapor
NSW, Australia                      | 


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

Date: Mon, 16 Feb 1998 05:45:12 -0500
From: perlguy@usa.net (Chris Brinegar)
Subject: non-terminating perl scripts
Message-Id: <perlguy-1602980545130001@mac.orion.net>

Hello everyone,

   I'm trying to build a non-terminating perl script as a fast way of
distributing and updating entries in a large in-memory hash (2Mb).

   I have been tinkering with the Sockets library example server/client in
the "Camel" book from O'Reilly, and was wondering if anyone could shed
some light on any hooks other than the Socket 'accept' call I could use to
get the instance to "suspend" until it recieves an incoming request.

   So far any looping mechanism I've come up with so far just eats up 90
percent of my process'. :P 

   I've been looking into SYSV::IPC as a way of running two process'.  One
the "server" (continuously running) and two the small client app
(initiated by the web-clients request) to read the shared memory and
deliver the output. But, I'm really looking for a single script solution.

   Any advice (or caveats) would be greatly appreciated!

   Thanks in advance,

Chris Brinegar

perlguy@usa.net

(at least, I aspire to be)


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

Date: 16 Feb 98 12:14:25 GMT
From: "TomH" <beans@bedford.net>
Subject: Re: non-terminating perl scripts
Message-Id: <01bd3ad4$e9ef6520$1a9163ce@beans.bedford.net>

You might look into event bindings from the TK module. I've only looked
briefly at them, but a GUI interface is by nature event driven. 

-Tom

Chris Brinegar <perlguy@usa.net> wrote in article
<perlguy-1602980545130001@mac.orion.net>...
> Hello everyone,
> 
>    I'm trying to build a non-terminating perl script 
 ...
I could use to
> get the instance to "suspend" until it recieves an incoming request.
> 



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

Date: Sun, 15 Feb 1998 23:00:35 GMT
From: mjlee@amherst.edu (MJ Lee)
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <34e76bbf.22451781@news.nyu.edu>

On 12 Feb 1998 09:28:16 -0700, Randal Schwartz <merlyn@stonehenge.com>
wrote:
>
>I used to answer about 5 to 30 messages a day in clpm.  If you've
>noticed, I don't any more.
>
 <snipped>
>
>And for me, that's sad.  Tom gets angry.  I just get sad.
>
I have been following clpm for about a year and I have to agree with
Randal that there are a lot of unnecessary postings in clpm and it has
been getting worse.

For about last six months, I usually download all the posts and sort
by "authors" so I can look for Randal, Tom, Joseph Hall, and others
Perl Gurus.  And I have to admit that I have learned a lot from these
postings.  I have also learned a lot from visiting "www.perl.com" that
Tom created.  There are tremendous amount of good materials - Please
look around.   I learned about "Schwartzian Transformation" from there
and other tricks that I use everyday.  

I don't get to use Perl much at my work but I try to use much as
possible.  I have printed out the entire FAQ, Perlman, and other
materials and it sits on my little cubicle.  I have a duplicate copy
at home.  Not to mention that I spent about hundreds of dollars buying
Perl books - I think I owned all the books that Tom recommended in his
Perl Critics page - When Joseph's book came out, I bought as soon as
it came out on the bookstore.  When Tom recommended Chapman book, I
went out and bought it. I learned from all these materials and still
learning more as I read the posts from clpm.

However, it is disheartening to hear Randal admitting that he is sad.
I had a previledge of meeting Randal with other Perl members when he
visited NYC on the day Perl was born.  Thanks for the stories, Randal.


Randal, Tom and other Perl Gurus, please do not give hope on clpm.
Everytime I search through clpm, I get excited to see posts from
Randal and Tom, like a kid opening a christmas gift.  When these names
disappear from clpm, I will be "sad". =(

MJ Lee - A newbie who fell in love with Perl.


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

Date: Mon, 16 Feb 1998 18:02:13 GMT
From: "Craig A. Keefner" <keefner@kinetic.com>
To: Stuart Grimshaw <stuartg.pcrsys@minorplanet.com>
Subject: Re: Perl on IIS4
Message-Id: <34E87DB9.5CD41CBB@kinetic.com>

i run it just fine.
yuo may need to tweak the registry and the use the Console
Manager to kick IIS in the butt...

Craig

Stuart Grimshaw wrote:

> Has anyone managed to succesfully install and run perl on IIS4 beta 2?
>
> I have had/am having major problems with both popular versions of Perl for
> Win32. One version simply refuses to work at all, and the other is unable to
> run any scripts sucessfully.





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

Date: Mon, 16 Feb 1998 18:27:59 -0600
From: airpix@hotmail.com
Subject: perlshop with cybercash
Message-Id: <6calie$hp3$1@nnrp1.dejanews.com>

Hi,
We are using perlshop.  It works well, but we are having trouble interfacing
with cybercash.  Please help if you can.  Need no know how to put the cart
into a this cart type id and carry it on into cybercash's invoice.
thanks in advance
airpix@hotmail.com

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Mon, 16 Feb 1998 01:37:29 -0500
From: Ignacio Bustamante <iggiebee@rhpworld.org>
Subject: PGP - Perl puzzle
Message-Id: <6c8n63$dhd@bgtnsc03.worldnet.att.net>

Hi,

Recently my ISP (Unix/Apache server) upgraded from an old version of PGP
to 2.6.2, and the script I am using to encrypt (via pgp) messages sent
by e-mail quit working.. period!.
 
Here is the puzzle:

>From the commad prompt (telenet) the following works from my home
directory to encrypt a sample text file named "test.txt" and create an
encrypted one named "test.enc"

-------Beging Command line Sample--------

Srv1:/home/my_home>pgp -feat <test.txt "my_public_key_id" >test.enc

-------End Command line Sample---------

The above also works from any subdirectory, when substituting for the
appropriate paths.

However the following Perl code, used to create an encrypted file from a
temporary text file for sending via e-mail, now doesn't work at all.
Needless to say, that I have tried various combinations, but the result
comes out the same; the generated encrypted file is *empty*.

-------Begin Perl PGP code-------

$path_to_pgp = "/usr/local/bin/pgp";
$my_public_key_id = "my_public_key_id";
$pgp_file_to_encrypt = "./some_directory/some_text_file.txt";
$pgp_output_file = "./some_directory/pgp_output.file";

# PGP Configuration files
$ENV{'PGPPATH'} = /home/my_home/.pgp;

open (PGPENCR, "|$path_to_pgp -feat \"$my_public_key_id\"
>$pgp_output_file");

print PGPENCR "$pgp_file_to_encrypt";

close (PGPENCR);

-------End Perl PGP code-------

Any help, ideas?

Regards,

Ignacio


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

Date: 16 Feb 1998 10:44:49 -0500
From: kcohen@julius.ling.ohio-state.edu (Kevin B Cohen)
Subject: Q: are line breaks disallowed in pod formatting commands?
Message-Id: <6c9mth$2rt@julius.ling.ohio-state.edu>

hi,

i've checked hall's "effective perl programming," which has a good
section on "plain ol' documentation," and the perlpod manpage, and
haven't found any mention of newlines being disallowed in the source
of a pod formatting command.  however, that seems to be the case in
the document that i'm working on.  for instance, if i have typed 

 ..very familiar sort of expression: C< if ($data =~ 
/regexp/) { do something}


(and yes, i do have to type the returns if i want wrapping in my
editor---
i'm working in visual studio (footnote 1)) then my output looks like
this:

 ...expression: C< if ($data.....


with that ugly C< right there, and no Courier.  on the other hand, if
i remove the newline from the source, 

 ...sort of expression: C< if ($data =~ /regexp/) { do something}


then my output looks just the way i would want it to.  no ugly C<>,
and the Right Stuff is in courier.

so: are newlines disallowed in pod formatting commands?

footnote 1: yes, i know that there are some sins which are there own
punishment.

kevin


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

Date: 16 Feb 1998 13:21:31 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Q: Storing complex records in DBM files
Message-Id: <6c9egr$nk5$3@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, Boris Boehlen <boris@i3.informatik.rwth-aachen.de> writes:
:I'd like to know how I can store a complex record using one of the DBM
:modules. Since the records might be very large I want use the GNU or
:Berkeley DBM.

You will fine a pointer to this in your perldsc, perltie, and perlfaq4
manpages.

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

There ain't nothin' in this world that's worth being a snot over.
	    --Larry Wall in <1992Aug19.041614.6963@netlabs.com>


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

Date: Mon, 16 Feb 1998 10:33:40 GMT
From: oleg@solomon.com.sg (Oleg Melnikov)
Subject: Replace in HTML files
Message-Id: <34e91603.261457425@news.solomon.com.sg>

Hi All

I have a problem (actually two):
1. I have a site with ~1000 HTML files with toolbars at top/bottom
Now I need to remove this toolbars from all files. Tolbar is a table.
So what I have to do is to remove table description from HTML file
i.e. open file and copy from this file to output file until

<table width="600".....

then copy rest of the file after </td></tr></table>.
The problem is that due to some smart people Frontpage 
changed some of this files so they looks like 

<table
	width="600..


	</td>
</tr></table>

2. I need to insert Javascript in each file (replacement):

	</head>
	
 to

	<script language="JavaScript">
	some javascript stuff
	</script>
	</head>

Any help and advise will be greatly appreciated.
Thanks in advance

Best regards.
Oleg





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

Date: Mon, 16 Feb 1998 08:17:31 PST
From: philexhosting@mailcity.com
Subject: Resselers Wanted!
Message-Id: <34e83c78.0@lightning.ica.net>

Philex.net is a fast growing ISP.  We are looking for resellers to help us expand into more territories around the world.  We provide the most profitable  reseller plans available on the net.  

We usually charge a $250 account setup fee to become a reseller.
However, for people that join by 2-28-98 we will waive this fee, and thus your reseller account is free.

So if you are interested in earning some extra money then click below:
http://www.philex.net/html/reseller.html (CODE IS 0001)

Btw , also if you need Web Hosting for as low as 19.95$ per month with 250Mb plus $400 in FREE gifts, then plz click below:
http://www.philex.net/agents/0001/	(CODE IS 0001)

With best wishes,
Alex K.






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

Date: Mon, 16 Feb 1998 18:40:39 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Running DOS commands in PERL script???
Message-Id: <MPG.f52988447f710149896e0@news.concentric.net>

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

jtorr@math.arizona.edu said...
: Im very new to perl for Windows NT, and although this is
: probabbly easy, I cant find a way to implement DOS/NT command line
: commands within a perl script, such as net use ,etc.

There's a book that you'll swear was written just for you.  It's published by 
O'Reilly.  It's called "Learning Perl on Win32 Systems."  It's written by 
Randal L. Schwartz, Erik Olsen, and TOM CHRISTIANSEN (hi, Tom).  You can buy 
it at Amazon.  Here's the URL.

http://www.amazon.com/exec/obidos/ISBN=1565923243/3618-0389901-274555

You can also see it at the O'Reilly site.

http://www.ora.com/catalog/lperlwin/

You can also read the documentation that came with Perl when you downloaded 
and installed it.  In particular, see perlfaq8, in the section entitled "How 
can I capture STDERR from an external command?"

-- 
#!/usr/bin/perl -w -- Just another Perl hacker,
 (open 0),$_=<0>,s,^.*-+ ,,,,chop;for(split?/*?){($$_++or$y=$_,y,
 y \,y,<STDIN>,,eval"sub $_ {print '$y'}"),y,0 \,},>STDOUT},,&$_}
# Jonathan Feinberg    jdf@pobox.com    Sunny Brooklyn, NY


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

Date: 16 Feb 1998 22:41:49 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Running DOS commands in PERL script???
Message-Id: <6cafbd$4g2$9@comdyn.comdyn.com.au>

In article <34E898BB.769E@math.arizona.edu>,
	Jose Torres <jtorr@math.arizona.edu> writes:

> Im very new to perl for Windows NT, and although this is
> probabbly easy, I cant find a way to implement DOS/NT command line
> commands within a perl script, such as net use ,etc.

perldoc -f system
perldoc -f exec
perldoc perlop
(look for qx// and `STRING` (these are backticks))

You should try to implement as much as you can in perl though. System
calls are not always a good idea.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Inside every anarchy lurks an old boy
Commercial Dynamics Pty. Ltd.       | network - Mitchell Kapor
NSW, Australia                      | 


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

Date: 16 Feb 1998 18:16:25 GMT
From: jhunterj@lexis-nexis.com (Hunter Johnson)
Subject: Sending mail from perl (was Re: Newbie question)
Message-Id: <6c9vpp$lho@mailgate.lexis-nexis.com>

In article <34E78BBF.5CED@cisco.com>,
Adam H. Fuller <fuller@sunsite.unc.edu> wrote:

> I need to know how to use perl to send email.  Can the perl script
> do the emailing, or would it be easier to have perl invoke a UNIX
> command or something?

The latter.

> I've got a UNIX script pinging about 20 computers in a network and
> saving the results to a file.  I use a really short perl script to
> sort through that file to find the nonresponsive computers.  This is
> where I need help: I want the script to email my beeper the "no
> answer from blah.blah.blah".  I've got everything set to work off a
> cron job so it'll be running continuously throughout the day.

open (MAIL, "| mail mybeeper@mybeeperhost.com") or die "some message";

 ...

print (MAIL  "no answer from ", $machine);

Hunter
--
J. Hunter Johnson        | "A little consistent wholesome modeling and
jhunterj@lexis-nexis.com |   costly servanthood are worth millions of
(937) 865-6800 x5385     |    true words harshly spoken."
Lexis-Nexis, Dayton, OH  |                               -- Ron Sider


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

Date: 17 Feb 1998 03:19:35 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: So what about last summer's RFD?  Let's go moderated.
Message-Id: <6cavk7$88r$1@news.orst.edu>

In article <34E87CE1.355D9A55@coos.dartmouth.edu>,
Chipmunk  <rjk@coos.dartmouth.edu> wrote:
>If you don't want to use a verified email address, then you'd be free
>not to post to the moderated newsgroup.

You know, the solution to this problem is so simple, I cannot imagine
why the best answer is to limit the group needlessly, unless the goal
is to limit the group needlessly.



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

Date: Mon, 16 Feb 1998 03:11:02 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: Sort help please!
Message-Id: <34E8108C.9670683C@5sigma.com>

For soul improvement, visit the various descriptions of the
Schwartzian Transform on my web site.  :-)

	-joseph

Craig Berry wrote:
> 
> Joseph N. Hall (joseph@5sigma.com) wrote:
> : If you use my new Sort::Fields module, you don't have to worry
> : about what a Schwartzian Transform (that map sort map thing)
> : is, or how it works.
> 
> Yes, but this hardly improves the soul, now, does it? :)

-- 
Joseph N. Hall, prop., 5 Sigma Productions       mailto:joseph@5sigma.com
Author, Effective Perl Programming . . . . . http://www.effectiveperl.com
Perl Training  . . . . . . . . . . . . . . .  http://www.perltraining.com


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

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

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