[8323] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1940 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 20 09:09:13 1998

Date: Fri, 20 Feb 98 06:02:41 -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           Fri, 20 Feb 1998     Volume: 8 Number: 1940

Today's topics:
    Re: Deleting GDBM records with perl <dformosa@st.nepean.uws.edu.au>
    Re: Deleting GDBM records with perl (Mike Heins)
        ExtUtils::TBone 1.106 uploaded to CPAN <eryq@zeegee.com>
    Re: FAQless Forays (was: Code Example Needed) (Craig Berry)
        FTP files without Net::FTP? <ptbs@ping.be>
    Re: Help - need telnet client in perl (Clay Irving)
        MIME-tools 4.116 uploaded to CPAN [vital bug fix] <eryq@zeegee.com>
        need help statically linking extensions to 5.004_04! (Mark R. Biggers)
    Re: Newbie + Databases (Clay Irving)
        nsapi_perl/Netscape::Server v0.20 available <bsugars@canoe.ca>
        Perl 4/5 - Part 2 <Geert.Roovers@POBoxes.com>
        Perl 4/5 <Geert.Roovers@POBoxes.com>
    Re: Perl 4/5 <qdtcall@esb.ericsson.se>
        Perl/sendmail  file attatchment <billy@net7.co.uk>
    Re: Perldebugger for Windows <matt.pryor@dial.pipex.com>
        PodParser-1.05 uploaded to CPAN (Brad Appleton)
    Re: printing problem <serbr@tin.it>
    Re: Pure stupidity <qdtcall@esb.ericsson.se>
    Re: Pure stupidity (Clay Irving)
    Re: Regex & locales. <rjk@coos.dartmouth.edu>
        script incombatibility. <paul@netmagic.net>
        Send Encrypt Email <lars.fornell@limelab.com>
        split and push <ok@unibest.ru>
    Re: split and push <mv@pdv-systeme.de>
    Re: Using Perl to encrypt credit card numbers at Web si <dformosa@st.nepean.uws.edu.au>
    Re: Verifying a URL? <merlyn@stonehenge.com>
        Web Based Email Program <lars.fornell@limelab.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 20 Feb 1998 10:39:07 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Deleting GDBM records with perl
Message-Id: <887971147.509600@cabal>

In <34ECD6DA.7A79@enduracorp.com> "Eric Aiken (x6495)" <eric.aiken@enduracorp.com> writes:

>I am trying to understand how a GDMB record is deleted.

>I have a perl script that will delete the record by it's key.  If
>I print out the records, it's gone, however the file size never 
>changes.  (ie the database continually grows larger and larger).

GDMB files are smaller then the file size repoprts. This
is because thay are what is termed a sparse file.  It is
sort of like sponge with alot of empty space in the structure.

So when you deleate an entery it dosnn't realy effect the file size.


--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: 20 Feb 98 12:06:58 GMT
From: mikeh@minivend.com (Mike Heins)
Subject: Re: Deleting GDBM records with perl
Message-Id: <34ed71e2.0@news.one.net>

? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au> wrote:
> In <34ECD6DA.7A79@enduracorp.com> "Eric Aiken (x6495)" <eric.aiken@enduracorp.com> writes:

>>I am trying to understand how a GDMB record is deleted.

>>I have a perl script that will delete the record by it's key.  If
>>I print out the records, it's gone, however the file size never 
>>changes.  (ie the database continually grows larger and larger).

> GDMB files are smaller then the file size repoprts. This
> is because thay are what is termed a sparse file.  It is
> sort of like sponge with alot of empty space in the structure.

> So when you deleate an entery it dosnn't realy effect the file size.

GDBM files are NOT sparse -- you are thinking of NDBM and ODBM.
But it is true you will not recover disk space until you do
a gdbm_reorganize call.

Usually if you delete keys and reach a peak number the file
stops growing, for it does re-use disk space from deleted keys.
But if you want it to shrink you will have to do a reorg or
just create a new version of the file.

Try 'man gdbm' and 'perldoc GDBM_File' for how to do this.

Regards,
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
Just because something is           131 Willow Lane, Floor 2  | ||  _ \
obviously happening doesn't         Oxford, OH  45056         | || |_) |
mean something obvious is           <mikeh@minivend.com>     |___|  _ <
happening. --Larry Wall             513.523.7621 FAX 7501        |_| \_\


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

Date: 20 Feb 1998 12:59:43 GMT
From: Eryq <eryq@zeegee.com>
Subject: ExtUtils::TBone 1.106 uploaded to CPAN
Message-Id: <6cjunv$mim$1@news1.teleport.com>

This is an Alpha release of something I've been tinkering
with for a while.  Comments are most welcome.
Feel free to start including it in your own distributions,
if it'll be useful to you.  Enjoy!
--------------------------

NAME
    ExtUtils::TBone - a "skeleton" for writing "t/*.t" test files.

SYNOPSIS
    Include a copy of this module in your t directory (as
    t/ExtUtils/TBone.pm), and then write your t/*.t files like this:

        use lib "./t";             # to pick up a ExtUtils::TBone
        use ExtUtils::TBone;

        # Make a tester... here are 3 different alternatives:
        my $T = typical ExtUtils::TBone;                 # standard log
        my $T = new ExtUtils::TBone;                     # no log 
        my $T = new ExtUtils::TBone "testout/Foo.tlog";  # explicit log
        
        # Begin testing, and expect 3 tests in all:
        $T->begin(3);                           # expect 3 tests
        $T->msg("Something for the log file");  # message for the log
        
        # Run some tests:    
        $T->ok($this);                  # test 1: no real info logged
        $T->ok($that,                   # test 2: logs a comment
               "Is that ok, or isn't it?"); 
        $T->ok(($this eq $that),        # test 3: logs comment + vars 
               "Do they match?",
               This => $this,
               That => $that);
        
        # End testing:
        $T->end;   

DESCRIPTION
    This module is intended for folks who release CPAN modules 
    with "t/*.t" tests. It makes it easy for you to output 
    syntactically correct test-output while at the same time 
    logging all test activity to a log file.

    Hopefully, bug reports which include the contents of this 
    file will be easier for you to investigate.

AUTHOR
    Eryq; President, Zero G Inc. 
    eryq@zeegee.com / http://www.zeegee.com.

-- 
  ___  _ _ _   _  ___ _   Eryq (eryq@zeegee.com)
 / _ \| '_| | | |/ _ ' /  President, Zero G Inc: http://www.zeegee.com/
|  __/| | | |_| | |_| |   
 \___||_|  \__, |\__, |___/\  Visit STREETWISE, Chicago's newspaper by/
           |___/    |______/ of the homeless: http://www.streetwise.org




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

Date: 17 Feb 1998 23:43:58 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <6cd7bu$g3k$1@marina.cinenet.net>

Steve Linberg (linberg@literacy.upenn.edu) wrote:
: > Consider that:
: > 
: >     if (my($x) = undef) { print "oops\n" }
: > 
: > prints, while
: > 
: >     if (my $x = undef) { print "oops\n" }
: > 
: > does not.
: 
: Yeek!  OK, Chip, my Camel and I give up.  Can you explain what's going on
: here?  undef evaluated in a list context returns true, but in a scalar
: context returns false?  Does this have some utility, or it is a byproduct
: of something else?

First off, the conditional of 'if' is a scalar context.

Within that, 'my $x = undef' evaluates directly to a scalar, undef, which 
is indeed logically false.

However, 'my ($x) = undef' evaluates to a list value, (undef) -- the value
of undef in a list context.  To convert this list to a scalar (for use by
'if'), Perl follows its normal rule -- using the number of list elements. 
In this case, that's 1, which is logically true. 

And yes, it freaked me out when I first saw it, too. :-)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Fri, 20 Feb 1998 14:36:33 +0100
From: Power Tools Busines Services NV <ptbs@ping.be>
Subject: FTP files without Net::FTP?
Message-Id: <34ED86E0.D214F653@ping.be>

I want to FTP a few files via my perl script.

I 've read the other articles in this newsgroup and I discovered the use
of Net::FTP.  I 've downloaded the modules and discovered that they
might be very useful.
Then I wanted to use them myself.  I contacted my provider and then the
problems occured.  They only deliver the standard PERL package, and they
don't allow us to use "perl Makefile.pm" to add new modules.

Now I still want to ftp those files, is there another solution?

Wouter Van Beneden
Yoeri Conickx

The PTBS team



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

Date: 20 Feb 1998 08:22:14 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Help - need telnet client in perl
Message-Id: <6ck026$7cs@panix.com>

In <34ed1b57.251890@news.inet.tele.dk> thor_denne_del_kan_slettes@post4.tele.dk (Thor) writes:

>While I am looking for TPJ I'd like to know if anyone can tell me
>where to find Net:: - I have been searching, but I haven't found it
>yet.

http://www.perl.com/CPAN/modules/by-module/Net/

Information TPJ is found at: http://tpj.com/

-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


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

Date: 20 Feb 1998 13:00:03 GMT
From: Eryq <eryq@zeegee.com>
Subject: MIME-tools 4.116 uploaded to CPAN [vital bug fix]
Message-Id: <6cjuoj$mjc$1@news1.teleport.com>

*** This is a vital bug-fix release *** 

Apparently, certain methods were not downcasing the content-type 
they returned (as they claimed); this has now been fixed in 4.116.  

If you use MIME-tools 4.x for Perl MIME-parsing, you should upgrade
ASAP, since this bug will cause all content-types not already
in all-lowercase to be handled by the parser as though they 
are unrecognized.  Particularly vulnerable are things 
like "MULTIPART/MIXED".   :-(

My thanks to Rodrigo de Almeida Siqueira for finding this bug.
A t/*.t test has been added to trap it in the future.

Okay, that's enough of my dirty laundry for this week.  :-)

-- 
  ___  _ _ _   _  ___ _   Eryq (eryq@zeegee.com)
 / _ \| '_| | | |/ _ ' /  President, Zero G Inc: http://www.zeegee.com/
|  __/| | | |_| | |_| |   
 \___||_|  \__, |\__, |___/\  Visit STREETWISE, Chicago's newspaper by/
           |___/    |______/ of the homeless: http://www.streetwise.org




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

Date: 20 Feb 1998 12:56:35 GMT
From: biggers@gooey.modelview.com (Mark R. Biggers)
Subject: need help statically linking extensions to 5.004_04!
Message-Id: <slrn6eqv7m.dc.biggers@gooey.modelview.com>
Keywords: perl5, static linking, MLDBM, Data::Dumper

Hello fellow Perlers,

I am attempting to build a 5.004_04 version of Perl, that has the
characteristics below.  I am now "stuck" attempting a build that has
the Data::Dumper and MLDBM modules ** statically linked **.

My applications are performance-sensitive and consist of a set of
custom Perl modules.  Each application is a CGI web app, and uses the
GGI.pm module included with Perl (among others).

*Real* performance enhancements, such as FastCGI or mod_perl, are too
baroque for my consulting client.  We are using Netscape
Enterprise 3.x as the Web server.

Here's my Config script, for Configure.  I untar the MLDBM and
Data::Dumper modules in the Perl/ext directory, as you see below.  The
script works great normally, without the extra extensions:

======================================== script

# Using gcc-2.7.2.3 on SPARC/Solaris 2.5.1...

LOCPATH=/opt/Summertime_97.sparc

Configure -Doptimize='-O' -Dcc=gcc \
    -Di_gdbm \
    -Ud_bincompat3 \
    -Uusedl \
    -Dprefix=/usr/local \
    -Dlocincpth="${LOCPATH}/include /usr/local/include" \
    -Dloclibpth="${LOCPATH}/lib /usr/local/lib" \
    -des

#    -Dextensions="Fcntl GDBM_File IO NDBM_File ODBM_File Opcode POSIX
# SDBM_File Socket Data_Dumper MLDBM"  ==> not seen by Configure :^(
#

======================================== /users1/Perl/perl5.004_04/ext

DB_File/            Fcntl/              MLDBM-1.25/         POSIX/
Data-Dumper-2.081/  GDBM_File/          NDBM_File/          SDBM_File/
Data_Dumper@        IO/                 ODBM_File/          Socket/
DynaLoader/         MLDBM@              Opcode/             util/


lrwxrwxrwx         17 Feb 19 16:04 Data_Dumper -> Data-Dumper-2.081
lrwxrwxrwx         10 Feb 19 16:03 MLDBM -> MLDBM-1.25

========================================

Data::Dumper ALMOST links statically -- I think I can figure a
work-around by adding the library flag -lDumper.  MLDBM doesn't have a
clue on this, unfortunately.

MY QUESTIONS:

1. Has anyone succeeded with a complete static link of Perl using
these two modules?   A "dynamic-link" build of Perl using these works
fine...  How did you do it?

2. Can I statically link the OTHER standard Perl modules, and then add
these as shared modules?  How?


Any insights are greatly appreciated!

----mark

biggers@nO_sPaMsaiph.com    <== note the anti-spam in e-mail replies!



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

Date: 20 Feb 1998 08:11:30 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Newbie + Databases
Message-Id: <6cjve2$6j7@panix.com>

In <34EA7868.41C6@info.curtin.edu.au> Ray Smith <ismithr@info.curtin.edu.au> writes:

>I'm just starting out so please excuse my incompetance.

Please read this information on how to choose a good subject for a post:
       <URL:http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post>

>I'm trying to write a Perl script (eventually to be used as a CGI) that
>will store about 30 values into a database file/table per key/record.  I
>have currently got the DB_File package and it seems that I can only
>store one value per key.  Does anyone know how to get around this,
>and/or any examples that actually do this.  I need to be able to search
>through the file - which will become quite large as time goes by - and
>do some processing on the individual values.

Here's one way -- Make the value a string you can split later:

  $hash{$key} = "value1|value2|value3|value4|value5";

-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


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

Date: 20 Feb 1998 12:58:18 GMT
From: Benjamin Sugars <bsugars@canoe.ca>
Subject: nsapi_perl/Netscape::Server v0.20 available
Message-Id: <6cjula$mii$1@news1.teleport.com>

Greetings,

Version 0.20 of nsapi_perl has been added to the CPAN as:
  file: $CPAN/authors/id/BSUGARS/nsapi_perl-0.20.tar.gz
  size: 43668 bytes
   md5: 5f55e218d2216db576c3639648af12bd

The latest version can always also be found at the nsapi_perl home
page located at:
  http://interact.canoe.ca/~bsugars/nsapi_perl.html

nsapi_perl is a set of Netscape Server API functions and Perl
extension modules that (in the spirit of mod_perl for Apache) embed a
Perl interpreter in a Netscape web server.  This allows you to program
to the Netscape server API in Perl rather than C.

The package includes the Netscape::Registry module which runs
unmodified Perl CGI programs from within the server process providing
large performance gains over regular CGI.

Major changes since version 0.15:
     - Now compiles out-of-the box on both Solaris and Windows NT
       (thanks to Steve Nielsen). Other Unix platforms are also
       supported, with a bit of hand-holding.

     - Will work with multi-threaded servers, with some caveats.

     - enhanced functionality of net_read and net_write methods
       (thanks to Olivier Dehon).

     - Added an interface to the func_exec NSAPI function.

     - Various bug fixes

Please let me know if you have success or problems installing
or using nsapi_perl.

Thanks,
-Ben

--
Ben Sugars <bsugars@canoe.ca>
Senior Webmaster,
CANOE Canadian Online Explorer,
http://www.canoe.ca/




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

Date: Fri, 20 Feb 1998 13:41:24 +0100
From: Geert Roovers <Geert.Roovers@POBoxes.com>
Subject: Perl 4/5 - Part 2
Message-Id: <34ED79F4.2ACA@POBoxes.com>

Hi.

What facts can I use to make my system manager upgrade to Perl 5?

Greetings

Geert Roovers


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

Date: Fri, 20 Feb 1998 12:28:21 +0100
From: Geert Roovers <Geert.Roovers@POBoxes.com>
Subject: Perl 4/5
Message-Id: <34ED68D5.129E@POBoxes.com>

Hi All!

I'm making my first steps on the Perl path, and sofar, I have one major
problem. I can only find books teaching me Perl 5, but my system manager
has only Perl 4 installed, and won't install the newest version. And I
think there is where some of my problems are.

What I definately could use is either a Perl 4 tutorial (not the MAN
pages, but a plain and simple tutorial, something like Perl 4 for
Dummies or something), or a doc that tells me what Perl 5 stuff is
implemented differently in Perl 4.

Is this available, and where can I find it?

thanx,

Geert Roovers


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

Date: 20 Feb 1998 13:45:54 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Perl 4/5
Message-Id: <isd8giigvx.fsf@godzilla.kiere.ericsson.se>

Geert Roovers <Geert.Roovers@POBoxes.com> writes:

> I can only find books teaching me Perl 5, but my system manager has
> only Perl 4 installed, and won't install the newest version. And I
> think there is where some of my problems are.

Sounds like a problem all right. I suggest you upgrade your sysadmin.
If he's gotten stuck in 1993, he's not much good anyway. Does he
refuse to upgrade sendmail beyond version 5 as well?
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Fri, 20 Feb 1998 13:08:47 +0000
From: Robert Barker <billy@net7.co.uk>
Subject: Perl/sendmail  file attatchment
Message-Id: <34ED805F.96617C1A@net7.co.uk>

Can u attatch files with sendmail???

I want the user to select a file from a html pulldown menu, fill in
their
email address and have the file sent back to them.

Must be possible (and probably quite simple).

Thanks



--
Robert Barker
System's Development Manager
Net7 Limited
http://www.net7.co.uk/

Tel: +44 (0)1924 444007
Fax: +44 (0)1924 445507

dataTRAK - Net7's Java Meta-Search Engine:
http://datatrak.net7.co.uk




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

Date: Fri, 20 Feb 1998 12:19:22 +0000
From: Matthew Pryor <matt.pryor@dial.pipex.com>
Subject: Re: Perldebugger for Windows
Message-Id: <34ED74CA.7CE53E3A@dial.pipex.com>



Weisshaupt & Partner AG wrote:

> I'm looking for a Perldebugger running under Windows 95 or NT.
> Does somebody know where I can get one?
>
> Sorry if this question was aked alread, it's my first time in this
> group.
>
> Daniel


I believe Activeware have just brought one out, you can find
it at www.activeware.com



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

Date: 20 Feb 1998 12:58:46 GMT
From: appleton@chiefs.northbrook.aieg.mot.com (Brad Appleton)
Subject: PodParser-1.05 uploaded to CPAN
Message-Id: <6cjum6$mik$1@news1.teleport.com>

Version 1.05 of PodParser has been uploaded to CPAN for public
consumption. This is a maintenance release with the following
changes:

 * Fixed a bug in Pod::Usage (it was using an obsolete name to access an
   attribute instead of using the new access method).

 * Removed the use of $`, $&, and $' throughout all modules in this package.

I tried to incorporate Nick Ing-Simmons patch which extended the
functionality of Pod::Parser::_interpolate_bottom_up() but his patch
seemed to break Pod::PlainText. I have emailed Nick with this information
and asked him to provide me with more info. I'm still waiting to hear back
from him. For this reason, his patch is _not_ in version 1.05.

PodParser consists of the following Perl 5 modules:

 Pod::Parser
 -----------
   The Perl5 module "Pod::Parser", which provides a base class for
   parsing and selecting sections of POD documentation from an input
   stream.  Please see the POD documentation for this module (embedded
   in the file "Parser.pm") for more details.

 Pod::Select
 -----------
   The Perl5 module "Pod::Select", which provides a subclass of
   Pod::Parser and an exported function named "podselect()" to dump
   selected sections of raw pod documentation from an input stream.
   Please see the POD documentation for this module (embedded in the
   file "Select.pm") and Pod::Parser for more details.

 Pod::Usage
 ----------
   The Perl5 module "Pod::Usage" which provides the function "pod2usage()"
   to print usage messages for a Perl script based on its embedded pod
   documentation. Pod::Usage is a subclass of Pod::PlainText. Please see
   the POD documentation for this module (embedded in the file "Usage.pm")
   for more details. The pod2usage() function is probably the most
   generally useful function in this entire distribution since it is
   useful to just about any Perl5 script that is invoked from the
   command-line.

 Pod::PlainText
 --------------
   A replacement for the Perl5 module "Pod::Text" and the corresponding
   "pod2text()" function. It is derived from the Pod::Parser class.

 Pod::InputObjects
 -----------------
   Some input objects needed by Pod::Parser, and for advanced users of
   Pod::Parser that need more about a command besides its name and text.


PodParser is released under the terms of the Perl Artistic License.

Please email any questions/comments/fixes/enhancements regarding
PodParser to me at the address in my email signature below.

Cheers!
-- 
Brad Appleton <bradapp@enteract.com> | http://www.enteract.com/~bradapp/
 "And miles to go before I sleep."   |  3700+ WWW links on CS & Sw-Eng




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

Date: 18 Feb 1998 18:58:41 GMT
From: Sergio Brandano <serbr@tin.it>
Subject: Re: printing problem
Message-Id: <6cfb11$5u@everest.vol.it>


>   [courtesy cc of this posting sent to cited author via email]
> 
> serbr@tin.it said...
> :  I would like to save in a postscript file an html page
> 
> http://wwitch.unl.edu/htmlconv.html
> 
> Please note that your question is not related to the Perl language.  Note also 
> that you'd have found the URL above if you'd done what I just did, which was 
> to use a web search engine.

> # Jonathan Feinberg    jdf@pobox.com    Sunny Brooklyn, NY


 Many thanks for Your courtesy, but You are very wrong in judging my message.

 My question is not at all "off topic", in fact my question is about perl and 
CGI,
 and involves also html and postscript. I do not need an html2ps converter, 
while
 I need an CGI command for printing on file instead of the browser.

  Note that if my message is "off topic" for this list, itself CGI should be
 "off topic" as well.

 The problem I addressed concerns the CGI output, which is a *dynamic html
 generated by a perl program*. When You print a whatever CGI output, You do 
this
 via the browser, which converts (very quickly) Your html (in RAM) to 
postscript
 (on file, if You like). Now, suppose You have 350 pages to print, do You still
 like to use the browser ?

 One (unfair) solution may be to generate a long html output, and then print it
 via the browser. There are two problems with it: 
 
 1) You have to force yourself printing via the browser. You like, instead, 
write
    a perl routine which purpose is to generate each html page on the fly,
    convert it (on the fly) to postscript, and send it to the printer spooler.
 2) Each page content should fit an A4 page, while pages have variable length.

 In my message I also noted that CGI.pm-2.36, that is the one I use, gives no
 information on how to "print" on file than on browser. One may find the way to
 save the output on html file (how ?), then apply html2ps on it, wait a fair
 amount of time to obtain the resulting postscript, then send it to the printer
 spooler. It would be nice to have a (fast) perl command for it, where "print"
 means "print on the printer", and html is used likewise a page-descriptor
 language (like TeX, for instance).

   OK ?


 Regards
--
 Sergio


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

Date: 20 Feb 1998 13:41:30 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Pure stupidity
Message-Id: <isen0yih39.fsf@godzilla.kiere.ericsson.se>

Grimoire <grimoire@oaktree.net> writes:

> #!/usr/bin/perl

Strongly consider using -w.

> $pw = '/etc/passwd';
> print "Who are you looking for? ";
> chomp($a = <>);
> open(PW, $pw) || die "cannot open $pw: $!";
                ^^
You could use "or" there. Looks better, if nothing else.

> while(<PW>){
> 	if($pw =~ /\$a/i){

Two problems here. First, you're matching on $pw, which you've set to
'/etc/passwd' and never change. Matching on $_ will probably work
much, much better. Second, your regexp matches '$a' literally, not the
contents of $a. Lose the backslash.

> 		print $_;
> 	}
> }

-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: 20 Feb 1998 08:24:58 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Pure stupidity
Message-Id: <6ck07a$7gm@panix.com>

In <Pine.LNX.3.95.980220015910.25979A-100000@harmony.oaktree.net> Grimoire <grimoire@oaktree.net> writes:

>I am TRYING to teach myself perl.  Most of the concepts I haven't had a
>problem with.  Though, I thought I would try to test myself and try to
>write something off the fly.  Regex's seem to be my angst.  The extremely
>easy code that follows seems to be causing me problems.

[ code omitted ]

>Please forgive my stupidity.

What everyone else said, and

  Please read this information on how to choose a good subject for a post:
       <URL:http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post>

-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


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

Date: Tue, 17 Feb 1998 18:55:48 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: abigail@fnx.com
Subject: Re: Regex & locales.
Message-Id: <34EA2384.437D1098@coos.dartmouth.edu>

[posted and mailed]

Abigail wrote:
> 
> In a regex, how does one match an uppercase letter in the current locale?

How about this:

$uc = '[^' . lc join('', map {chr} 0x00 .. 0x7F) . ']';

$string =~ /$uc/;

-- 
 _ / '  _      /             rjk@coos.dartmouth.edu
( /)//)//)(//)/(                     chipmunk@m-net.arbornet.org
    /                                        http://www.ziplink.net/~rjk/


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

Date: Thu, 19 Feb 1998 17:26:37 -0800
From: Paul Vudmaska <paul@netmagic.net>
Subject: script incombatibility.
Message-Id: <34ECDBCC.5E59F139@netmagic.net>

I've just moved to another ISP. The scripts I used there, which were
modified from Matt's scripts do not work now.
>From what I gather, this has to do with the  "@" in strings, seems they
need a backslash. I replaced the ones in the code
but am still unable to get the scripts to work. However when I run them
from a command line with Telenet, they do send me the mail that was
'hard fixed'. This may be because the script excepts input for email,
which of course, will have an @ in. But all I have is a variable to work
with. Is this perhaps the problem. If so is there a fix?

A lot of the warnings recieved during debugging are 'uninitialized
values'.
=======
$mailProp=$FORM{'bb_email'};

open (MAIL, "|$mailprog $mailProp") || die "Can't open $mailprog!\n";
   print MAIL "Reply-to:$FORM{'email'}\n";
   print MAIL "From:$FORM{'email'} \n";
   print MAIL "Subject: Guest Log\n\n";
   print MAIL "You have a new Booking entry.\n\n";
   print MAIL
"------------------------------------------------------\n";
   print MAIL "Guest Name:$FORM{'fname'}  $FORM{'lname'}\n";
   print MAIL "Address: $FORM{'address'}\n";


   close (MAIL);
===============

FINALLY! I can not get the debugger to stop displaying so that I can see
the top of the session. Is there a way to do that?

Many,many thanx*2,

pv



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

Date: Fri, 20 Feb 1998 12:13:57 +0100
From: Lars FORNELL <lars.fornell@limelab.com>
Subject: Send Encrypt Email
Message-Id: <34ED6574.D5C5C7F5@limelab.com>

How do I send encrypt email with Perl ?

I have seen a lot of Perl applications using PGP to send
encrypt emails but I want to be able to send encrypt
email with the RSA standard so that for example the
Netscape Email program can receive it.

/Lars FORNELL

--
lars.fornell@limelab.com
Limelab web development
http://www.limelab.com




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

Date: Fri, 20 Feb 1998 12:27:39 +0300
From: ok <ok@unibest.ru>
Subject: split and push
Message-Id: <34ED4C8B.4ECF@unibest.ru>

There are two examples:

 1) @a=split(/,/,"")

 2) push @b,""

 Why $#a==-1 but $#b==0?

 P.S. I think, that in case 1) the result must be the same as in case
2).


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

Date: Fri, 20 Feb 1998 12:52:26 +0100
From: "Martin Vorlaender" <mv@pdv-systeme.de>
Subject: Re: split and push
Message-Id: <6cjqqe$lsr$1@tpl-news.bs.tpl.net>

ok <34ED4C8B.4ECF@unibest.ru> wrote...
>There are two examples:
> 1) @a=split(/,/,"")
> 2) push @b,""
> Why $#a==-1 but $#b==0?
> P.S. I think, that in case 1) the result must be the same as in case 2).

Obviously.

1) Empty string, nothing to split, so @a = (), $#a == -1
2) An empty string gets pushed onto @b, so @b = (''), $#b == 0

cu,
  Martin
-- 
                   | Martin Vorlaender         VMS & WNT programmer
 OpenVMS  --        | work: mv@pdv-systeme.de
 Where do you want  |       http://www.pdv-systeme.de/users/martinv/
 to BE today?       | home: martin@radiogaga.harz.de




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

Date: 17 Feb 1998 23:24:15 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Using Perl to encrypt credit card numbers at Web sites
Message-Id: <887757812.536353@cabal>

In <01bd3b55$36df3a60$3667accf@pentium-233mmx> "Philip Kapusta" <shareware@erols.com> writes:

[...]

>Currently I am
>performing a very basic 1 for 1 character swapping with the credit card
>number, and then sending the form's data with the encrypted card number to
>an email account.

Eather use real encrytpion or send it in the clear this type of rot-13ish
encoding produces no strenth at all.  Say your CC number is 10 digets
long, has a cuppel of repeaded digets and a checksum of some sort.  Ok you
would have a code something like this

aabeffghhi

I would only have to search 10C7 or 720.  And If I get 10 examples of your
code I can calculate it mathimaticly.  If you need encryption use real
encrytion.

[...]

>1) Is there a better method to handle such a situation?

Yes, PGP would probly work.

>2) Can PGP be used with a Perl script?  If so, how?

There is a PGP::Pipe wich is ok.

--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: 20 Feb 1998 06:50:50 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: donut@bayarea.net (Plastic Nuclear Ferret)
Subject: Re: Verifying a URL?
Message-Id: <8cn2fml70l.fsf@gadget.cscaper.com>

>>>>> "Plastic" == Plastic Nuclear Ferret <donut@bayarea.net> writes:

Plastic> you could attempt to open up a telnet connection to the SMTP
Plastic> server (usually done by telnetting to port 25 of that host).
Plastic> this, most likely, wont work on any machine except for those
Plastic> running unix or those that have telnet requests turned off
Plastic> (at least from the outside).

You *could* attempt to use Dejanews to pull up the 14 times this
question has been asked in the past two months, including the replies
that demonstrate why *your* solution doesn't work, even for the
majority of the addresses on the net (think: "aol.com", for example).

Grrr.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 193 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Fri, 20 Feb 1998 11:51:21 +0100
From: Lars FORNELL <lars.fornell@limelab.com>
Subject: Web Based Email Program
Message-Id: <34ED6029.43A5E5AB@limelab.com>

I'm looking for a Web based Email program preferably in
Perl.

I've search trough the net but only found one.

It's called Clio (http://www.clio.com).

Does any one know if there exists any others ?

/Lars FORNELL
--
lars.fornell@limelab.com
Limelab web development
http://www.limelab.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 1940
**************************************

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