[15547] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2960 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 5 14:05:32 2000

Date: Fri, 5 May 2000 11:05:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <957549914-v9-i2960@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 5 May 2000     Volume: 9 Number: 2960

Today's topics:
        Accessing CDDB database? <rickyfusion@fusionserver.com>
    Re: Accessing CDDB database? <rootbeer@redcat.com>
    Re: adding numbers in regexp <vibrato@my-deja.com>
    Re: AGAIN about the CGI program <jeff@vpservices.com>
    Re: And htmlencode? (Clay Irving)
    Re: And htmlencode? nobull@mail.com
        Color under MSDOS/NT <aureld@free.fr>
        Context in examples (was: LWP POST syntax @{@$%??}) nobull@mail.com
        Crontab & Perl <todd@mrnoitall.com>
    Re: Crontab & Perl <rootbeer@redcat.com>
    Re: Crontab & Perl (David Efflandt)
    Re: crypt problems (David Efflandt)
        DCOM in Perl <dpao@go.to>
    Re: DCOM in Perl <rootbeer@redcat.com>
        Dynamically generate eXcel spreadsheet wjair@my-deja.com
        error message <johnnylee@totalise.co.uk>
        file upload <johnnylee@totalise.co.uk>
    Re: file upload <johnnylee@totalise.co.uk>
    Re: First Perl Program (Tad McClellan)
    Re: getting started with perl on unix <andrew.mcguire@walgreens.com>
    Re: getting started with perl on unix <rootbeer@redcat.com>
    Re: getting started with perl on unix (Tad McClellan)
    Re: getting started with perl on unix <andrew.mcguire@walgreens.com>
    Re: Good Perl website? (Tad McClellan)
    Re: Guess what? the largest online book store Amazon.co (Steve)
    Re: Help please -- pod2html <bolshoe_noga@bigfoot.com>
    Re: Help running my app from cron.  Enviromental varl i (David Efflandt)
    Re: I thought i had this right, plz help <rootbeer@redcat.com>
        Inerpolating expressions (was: adding numbers in regexp nobull@mail.com
        module data usage question phukit@enteract.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 5 May 2000 10:37:36 -0400
From: "Ric Smith" <rickyfusion@fusionserver.com>
Subject: Accessing CDDB database?
Message-Id: <8eumh5$629$1@server.cntfl.com>

Has anyone had success in accessing the cddb
database through a web app?

Thanks.

--
-- Ric Smith




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

Date: Fri, 5 May 2000 08:49:04 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Accessing CDDB database?
Message-Id: <Pine.GSO.4.10.10005050847530.6766-100000@user2.teleport.com>

On Fri, 5 May 2000, Ric Smith wrote:

> Has anyone had success in accessing the cddb
> database through a web app?

Perhaps you should search for the docs, FAQs, and newsgroups about
programming for the web. The newsgroup comp.infosystems.www.authoring.cgi
may be able to help you. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 05 May 2000 16:32:10 GMT
From: Lance Hoffmeyer <vibrato@my-deja.com>
Subject: Re: adding numbers in regexp
Message-Id: <8eut2a$6rc$1@nnrp1.deja.com>

In article <MPG.137ba376ff5609e798aa06@nntp.hpl.hp.com>,
  Larry Rosler <lr@hpl.hp.com> wrote:
> In article <8essgt$gv$1@nnrp1.deja.com> on Thu, 04 May 2000 22:10:50
> GMT, Lance Hoffmeyer <vibrato@my-deja.com> says...
> > Is there a way for me to add numbers in a regexp from the command
> > prompt?
> >
> > I have a file that has
> >
> >    Q5A_01 10
> >    Q5A_02 12
> >  that I want to change to
> >    Q5A_01 10-11
> >    Q5A_01 12-13
> >
> > I tried
> >
> > perl -pibk -e "s/Q5[A-F]\_[0-9]{2}\s([0-9]{2})/$1\-$1+1/" file
> >
> > but all that gives me is
> >
> >    Q5A_01 10-10+1
> >    Q5A_02 12-12+1
>
> No it doesn't, because you didn't capture the first part of each line.
>
> > Any suggestions?
>
> Regex shortened and corrected; substitution evaluated by
interpolation:
>
>   perl -pibk -e "s/(Q5[A-F]_\d\d\s(\d\d))/$1-${\($2+1)}/" file


So, how does this work?

$1 = Q5[A-F]_...(\d\d)
$2 = \d\d

so that /$1 prints
Q5A_01 10-   and ${\($2+1)} prints 11
I assume brackets after a $ allow one to add, substract, and perform
executions
but why the backslash before the ($2+1)   Is it an idicator of what is
going to be executed?

Lance






>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 05 May 2000 08:45:11 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: AGAIN about the CGI program
Message-Id: <3912EC87.E02ABF93@vpservices.com>

bentium wrote:
> 
> hi, there
>     the program is okay when i am executed it in command line like this "
> perl -T commerce.cgi" .
>     But how can i execute it with browser , how can i input the "-T "
> argument.

Every webserver I have ever used works with the -T switch
automatically.  Are you sure that yours doesn't?  The "Too late for -T
option" error usually only shows up on the command line.  If you get
that error from a browser, then you need to correct the server and to do
that you'd need to either talk to your sysadmin or, if you are the
sysadmin, read the docs or newsgroups specific to your server.

-- 
Jeff


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

Date: 5 May 2000 16:58:05 GMT
From: clay@kozmik.skechers.com (Clay Irving)
Subject: Re: And htmlencode?
Message-Id: <8euuit$k38$1@news.panix.com>

On Fri, 05 May 2000 14:46:00 GMT, Russell England <russ@css2.com> wrote:

>Is there aslo a perl equivalent to the asp function server.htmlencode()?

I don't know. This is a Perl newsgroup -- Are we expected to know what
server.htmlencode() does?

--
Clay Irving
clay@panix.com


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

Date: 05 May 2000 18:24:04 +0100
From: nobull@mail.com
Subject: Re: And htmlencode?
Message-Id: <u98zxonc5n.fsf@wcl-l.bham.ac.uk>

"Russell England" <russ@css2.com> writes:

> Is there aslo a perl equivalent to the asp function server.htmlencode()?

Just guessing the semantics of server.htmlencode() I'd say:

CGI->escapeHTML()

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 05 May 2000 16:21:38 GMT
From: "Aurelien" <aureld@free.fr>
Subject: Color under MSDOS/NT
Message-Id: <myCQ4.164$qz7.471155@nnrp3.proxad.net>

Hello !

I have a problem to have color under MS-DOS (Windows NT). I have installed
ActivePerl with PPM. I have installed the Termios-ANSIColor module and when
I run my script I don't have color but I have the colors codes. What can I
do to have color ?

Thanks to answer me.

Aurélien




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

Date: 05 May 2000 18:26:00 +0100
From: nobull@mail.com
Subject: Context in examples (was: LWP POST syntax @{@$%??})
Message-Id: <u97ld8nc2f.fsf@wcl-l.bham.ac.uk>

Tom Phoenix <rootbeer@redcat.com> writes:

> If you're still stuck, cut your code down to just one or two lines
> which aren't doing what you want, perhaps along with a couple of
> additional lines for context.

In general this is not the best advice.  Experience (and common sense)
shows that the person who doesn't understand what's going on is not
best suited to judge how much context is required to understand what
is going on.

Normally I wouldn't bother to criticise but since Tom gives such
prolific advice to newbies I think it is important that he should be
giving optimal advice.

Cut code down to the smallest script that compiles and runs without
warnings under "use strict" and illustrates the lines not doing what
is wanted.  Often the process of doing this will enable you to find
the problem yourself.

If the small script is less than a few dozen lines then post it in its
entirity.  If it's still big then post only the bits you think are
important and give a URL where the whole thing can be found.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 05 May 2000 10:20:27 -0600
From: Todd Anderson <todd@mrnoitall.com>
Subject: Crontab & Perl
Message-Id: <3912F3E6.8AEF1F1C@mrnoitall.com>

Dear Sirs,
I have a very simple crontab script (cron.pl) that prompts my main
script. The cron.pl script works when prompted by my browser or at the
command line. But it doesn't work when prompted by cron. I have veryfied
that cron is prompting the cron.pl script.
Why is this?
Thanks in advance for your ideas.

#!/usr/bin/perl
# Name: cron.pl
#simply sends form data to the main script . Located in same dir
$ENV{'REQUEST_METHOD'} = 'POST';
$FORM{'accwrd'} = "sdfe";
$FORM{'adminspwrd'} = "1234";
$FORM{'sdvaw'} = "y";
$FORM{'vghirt'} = "email-txt";
$FORM{'xcvbnfgf'} = "20";
$FORM{'auto_send'} = "on";

require "/home/my/public_html/dir/cgi-bin/main.cgi";






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

Date: Fri, 5 May 2000 09:55:41 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Crontab & Perl
Message-Id: <Pine.GSO.4.10.10005050953420.6766-100000@user2.teleport.com>

On Fri, 5 May 2000, Todd Anderson wrote:

> But it doesn't work when prompted by cron. 

Generally, when a program that works at the command line doesn't work the
same way under cron, it's relying upon something in the environment - an
environment variable, or the current directory, or something like that.

Go through the program and look for anything which may be doing this,
including external programs which your program runs.

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 5 May 2000 17:37:27 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Crontab & Perl
Message-Id: <slrn8h61mu.gu8.efflandt@efflandt.xnet.com>

On Fri, 05 May 2000 10:20:27 -0600, Todd Anderson <todd@mrnoitall.com> wrote:
>Dear Sirs,
>I have a very simple crontab script (cron.pl) that prompts my main
>script. The cron.pl script works when prompted by my browser or at the
>command line. But it doesn't work when prompted by cron. I have veryfied
>that cron is prompting the cron.pl script.
>Why is this?
>Thanks in advance for your ideas.
>
>#!/usr/bin/perl
># Name: cron.pl
>#simply sends form data to the main script . Located in same dir
>$ENV{'REQUEST_METHOD'} = 'POST';
>$FORM{'accwrd'} = "sdfe";
>$FORM{'adminspwrd'} = "1234";
>$FORM{'sdvaw'} = "y";
>$FORM{'vghirt'} = "email-txt";
>$FORM{'xcvbnfgf'} = "20";
>$FORM{'auto_send'} = "on";
>
>require "/home/my/public_html/dir/cgi-bin/main.cgi";

It is probably not a Perl specific question, but if cron does not properly
e-mail you a message with any errors, why don't you try directing STDOUT
and STDERR to a log file from the cron entry:

/home/my/cron.pl > /home/my/cron.log 2>&1

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



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

Date: 5 May 2000 17:24:08 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: crypt problems
Message-Id: <slrn8h60tv.gu8.efflandt@efflandt.xnet.com>

On Thu, 04 May 2000, douceur <douceurNOdoSPAM@flashmail.com.invalid> wrote:
>I'm making a cgi script that uses encrypted passwords.  But I'm having
>a problem with the crypt() function.  When I use it in one area of the
>script, and then I use it in another area of the script (with the same
>password), it gives different values.  I therefore can't use the same
>password file, although I'm sure that I should be able to.  Any help
>would be appreciated.

You don't give any specifics, but it really does not matter if the same
password with different salt crypts differently.  In fact you should use
random salt so no one can tell by looking at the password file if two
people are using the same password.

All that matters is that you use the previously crypted password as salt
when authenticating a user supplied password.  In other words:

if (crypt($passwd,$crypted) eq $crypted) {
    # $passwd is good password
} else {
    # bad password
}

Just DO NOT try to use a substring of the crypted password as salt when
authenticating, it is unnecessary and could fail (MD5 crypt).

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



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

Date: Fri, 05 May 2000 15:30:06 GMT
From: <dpao@go.to>
Subject: DCOM in Perl
Message-Id: <sh5q7utogbn89@corp.supernews.com>

Greetings,

Does anyone know of a Perl module that allows DCOM access.
Has anyone ever done anything with DCOM in Perl?
If you did please give me some pointers/resources.




--
Posted via CNET Help.com
http://www.help.com/


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

Date: Fri, 5 May 2000 08:46:20 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: DCOM in Perl
Message-Id: <Pine.GSO.4.10.10005050846060.6766-100000@user2.teleport.com>

On Fri, 5 May 2000 dpao@go.to wrote:

> Does anyone know of a Perl module that allows DCOM access.

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

    http://search.cpan.org/
    http://www.cpan.org/

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 05 May 2000 15:08:18 GMT
From: wjair@my-deja.com
Subject: Dynamically generate eXcel spreadsheet
Message-Id: <8euo4l$136$1@nnrp1.deja.com>

Hi,

Is there a way to dynamically generate eXcel spreadsheet
and eXcel's chart on client's browser from the data that
got send back from the server?


Thanks for the help,
Willy Jair
wjair@hotmail.com




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 05 May 2000 17:02:07 GMT
From: "Johnny Boy" <johnnylee@totalise.co.uk>
Subject: error message
Message-Id: <39130d82.0@news2.cluster1.telinco.net>

I am running (trying to really) run a file upload script using cgi.pm.  When
I run the script I am getting a
malformed multipart post error that I haven't got a clue how to handle.
Could some nice soul tell me what the error means and how to correct it?






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

Date: Fri, 05 May 2000 16:31:20 GMT
From: "Johnny Boy" <johnnylee@totalise.co.uk>
Subject: file upload
Message-Id: <3913064c.0@news2.cluster1.telinco.net>

I am running (trying to really) run a file upload script using cgi.pm.  When
I run the script I am getting a
malformed multipart post error that I haven't got a clue how to handle.
Could some nice soul tell me what the error means and how to correct it?




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

Date: Fri, 05 May 2000 15:16:16 GMT
From: "Johnny Boy" <johnnylee@totalise.co.uk>
Subject: Re: file upload
Message-Id: <3912f4b3.0@news2.cluster1.telinco.net>

muchos




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

Date: Fri, 5 May 2000 10:35:54 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: First Perl Program
Message-Id: <slrn8h5n2a.4k3.tadmc@magna.metronet.com>

On Fri, 05 May 2000 09:40:38 GMT, steven_coutts@hotmail.com <steven_coutts@hotmail.com> wrote:

>Hello all, I am new to perl but have programmed before. 


A new convert.  :-)

Welcome!

The First Thing You Should Know is that perl is distributed with
lots and lots of documentation about itself.

It is also distributed with a program named 'perldoc' that
can look stuff up there for you.

Learn how to use it

   perldoc perldoc

as a *first* step in solving nearly every Perl-related problem.



>What I want to
>do is to create a web page 


That part has nothing to do with Perl, and is off-topic
for this newsgroup.

Such things are on-topic for newsgroups in the 
comp.infosystems.www.* hierarchy. Have a look
around over there.

You need to create an HTML <form>.


But there are several Perl FAQs that mention CGI. You can
see them by typing:

   perldoc -q CGI

A couple to take particular note of:

   "Where can I learn about CGI or Web programming in Perl?"

   "How do I make sure users can't enter values into a form that 
    cause my CGI script to do bad things?"


>that users enter in there username and
>password, 


Those will be going across the Internet in *clear text* with
a normal setup.

You are asking crackers to break your stuff.

Be careful!


>now I want a perl script to run a command 


   perldoc -q STDERR

describes the 3 ways of running external programs from within Perl.


>on my linux box
>using the username and password supplied as command line parameters.
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^

Anyone else who is logged into your system can likely see those.

Be even more careful!


>Is this possible and can anyone give me any pointers to get started?


It is possible, and very dangerous.

Also see:

   perldoc -q password

   perldoc perlsec


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


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

Date: Fri, 05 May 2000 10:36:31 -0500
From: "Andrew N. McGuire" <andrew.mcguire@walgreens.com>
Subject: Re: getting started with perl on unix
Message-Id: <3912EA7F.E1B995DD@walgreens.com>

Susan wrote:
> 
> I'm a little lost.  I see perl5 on my unix box but don't
> know how to use it.  I created a small perl script and get a
> message "permission denied".  It looks to me like all of the
> files in the perl5 subdirectories can be read by anyone.
> Help!

To find the appropriate binary to use, type perl at the command line.
If you dont get an error, and it looks like your shell is just
sitting there, perl is in your search PATH.  At that point you
can try 'which perl' or maybe 'whence perl'.  This should print
out something like the following:

[anm@sputnik ~]: which perl
/usr/local/bin/perl

For me, I can use /usr/local/bin/perl.  Perl is also commonly installed
as /usr/bin/perl.

Once you know the path to the binary, the first line of your script
should be something like '#!/usr/bin/perl -w' or whatever the
appropriate
path is.

Next try something like 'chmod 755 myscript.pl' or whatever the name 
of your program is.  This will make your program executable, try
'man chmod' for more details.  You may also want to take a look at
'perldoc perl' to see where to find more documentation on Perl specific
things.

Regards,

anm
-- 
Andrew N. McGuire
andrew.mcguire@walgreens.com


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

Date: Fri, 5 May 2000 08:51:55 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: getting started with perl on unix
Message-Id: <Pine.GSO.4.10.10005050849320.6766-100000@user2.teleport.com>

On Fri, 5 May 2000, Andrew N. McGuire wrote:

> To find the appropriate binary to use, type perl at the command line.
> If you dont get an error, and it looks like your shell is just
> sitting there, perl is in your search PATH.  At that point you
> can try 'which perl' or maybe 'whence perl'.  

It may help to press a key combination like control-C (among several
possibilities) before trying to enter a command at "that point". :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 5 May 2000 09:42:12 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: getting started with perl on unix
Message-Id: <slrn8h5jtk.4k3.tadmc@magna.metronet.com>

[ please put your comments *following* the quoted text that your
  comment applies to

  please to not quote .sigs

  please quote only text that you are going to comment on

  please limit your line lengths to the customary 70-72
  characters (you have 150 characters on a single line)

  it is Very Good of you to help out here, but please find
  out the most basic rudiments of how to post to Usenet first.
  See the FAQs posted periodically to:    news.announce.newusers
  to get the most out of Usenet

  Jeopardectomy performed.
]


On Fri, 05 May 2000 07:46:28 -0500, Paul R. Andersen <andersen+@rchland.ibm.com> wrote:
>
>Susan wrote:
>
>> I'm a little lost.  I see perl5 on my unix box but don't
>> know how to use it.  I created a small perl script and get a
>> message "permission denied".  It looks to me like all of the
>> files in the perl5 subdirectories can be read by anyone.
>> Help!


>Did you remember to chmod +x your script?  Have you got the first line of the script correct (something like: #!/usr/bin/perl)  I believe both of these will
>cause a permissions error.


You can eliminate problems with the shebang line altogether
if you do not _use_ the shebang line:

   perl my_prog    (or  /usr/bin/perl my_prog)

If that works, and

   my_prog   (or ./my_prog)

doesn't work, then you have a shebang line problem.


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


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

Date: Fri, 05 May 2000 11:04:19 -0500
From: "Andrew N. McGuire" <andrew.mcguire@walgreens.com>
Subject: Re: getting started with perl on unix
Message-Id: <3912F103.1F6B507D@walgreens.com>

Tom Phoenix wrote:
> 
> On Fri, 5 May 2000, Andrew N. McGuire wrote:
> 
> > To find the appropriate binary to use, type perl at the command line.
> > If you dont get an error, and it looks like your shell is just
> > sitting there, perl is in your search PATH.  At that point you
> > can try 'which perl' or maybe 'whence perl'.
> 
> It may help to press a key combination like control-C (among several
> possibilities) before trying to enter a command at "that point". :-)

I figured that was obvious, but you know:

$assume = "ass" . "u" . "me"; # ;^)

So maybe I shouldn't have assumed, huh?

Cheers,

anm
-- 
Andrew N. McGuire
andrew.mcguire@walgreens.com


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

Date: Fri, 5 May 2000 11:12:40 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Good Perl website?
Message-Id: <slrn8h5p78.4k3.tadmc@magna.metronet.com>

On Fri, 05 May 2000 03:54:49 GMT, Tse <Tse_Ng@hotmail.com> wrote:

>Anyone know of any good Perl reference web site?


   http://reference.perl.com/


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


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

Date: 5 May 2000 16:56:24 GMT
From: sjlen@ndirect.co.uk (Steve)
Subject: Re: Guess what? the largest online book store Amazon.com
Message-Id: <slrn8h5me4.2a8.sjlen@zero-pps.localdomain>

On Thu, 04 May 2000 22:36:10 -0700, Jon A. Cruz wrote:
>
>Well, obviously you haven't seen my local bookstores. Not as much in
>stock, and when they do, much higher prices. Perhaps his are similar.
>
If you've got to read the book first you can't be in that much of a rush
otherwise you'd pay someone else to do it.  Here they don't charge any
extra for ordering a title for you.  When it comes to paying a bit more
then I don't mind if it means I'm not going to be living in a ghost town.

>Then again, my three closest bookstores are Barns & Nobel (
>http://www.bn.com/ ), Borders ( http://www.borders.com/ ), and Crown
>Books ( http://www.crownbooks.com/ ).

When you pay for a book in a shop the proceed go towards the wages of
the manager and assistants in that store, if people stop buying from
there those local people will be out of a job.  I also trust the advice
of the people in there who are dealing with books all day rather than 
the advice given to me by a java applet. 

>I even went in to them today looking for a new book. I got more info
>using the on-line stores.

Hmm hype or information?

Anyway John long time no see I havn't read any IMP stuff for a while and
havn't seen you in p.o-t or p.b.i,  didn't know you were interested in 
perl.

-- 
Cheers
Steve              email mailto:sjlen@ndirect.co.uk

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.ndirect.co.uk/~sjlen/

or  http://start.at/zero-pps

 10:59am  up 8 days, 13:00,  3 users,  load average: 1.29, 1.10, 1.03


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

Date: Fri, 05 May 2000 15:25:50 GMT
From: Juan Gama <bolshoe_noga@bigfoot.com>
Subject: Re: Help please -- pod2html
Message-Id: <sOcSOTun=ROmgiKtLZoIPHck9bhO@4ax.com>

On Fri, 05 May 2000 12:51:37 GMT, bart.lateur@skynet.be (Bart Lateur)
said:

>Juan Gama wrote:

>>Thank you.  But when I enter

>>   pod2html perlvar.pod outfile=c:\perl\perlvar.html

>>and variations of that, with or without the file name in quotes, it
>>always comes back saying:

>>   Can't open outfile: No such file or directory at
>>   C:/Perl/lib/Pod/Html.pm line 365, <POD> chunk 375.

>Of course not. You forgot the hyphen/minus sign in front of "outfile".

How could I forget it if I didn't know it was supposed to be there?
Anyway, thank you.  That made it work.  Actually, I put two hyphens in
front.  (--outfile=...)

>You may also need to keep the filename perlpod.var for last.

I did it that way, on your advice.  I didn't try it the other way.

>You can also try

>   pod2html perlvar.pod >c:\perl\perlvar.html

>(untested)

That was the first thing I tried, before I posted my query.  It
created the file, but left it empty.



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

Date: 5 May 2000 17:54:02 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Help running my app from cron.  Enviromental varl issue..?
Message-Id: <slrn8h62m1.gu8.efflandt@efflandt.xnet.com>

On Fri, 05 May 2000 00:54:26 GMT, Dave LaPorte <laporte@pcpros.net> wrote:
>	Could someone please help me with the following.  I have
>written a small perl app that goes to a NFS's dir between AIX unix and
>RedHat linux 6.0. the dir /home/wscfax actaully exists on the linux
>box.  Any way a cobol program writes a quote file to the /home/wscfax.
>Then my program will be fired off from Roots cron and checks that dir,
>if it finds files it will either fax or email off the file.
> 	The program works perfectly,   I can execute it as myself or
>as Root user manually. But when I try to execute the program using a
>cron entry for root, the program seems to stop about halfway through.

Besides suggestions from another post, are you sure that 'sendfax' or any
other programs it needs to access are in your PATH?

And since you run it every 5 minutes, have you thought about what would
happen if it is launched again while still running?  Early in the script
you may want to have it terminate if already running.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



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

Date: Fri, 5 May 2000 08:14:20 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: I thought i had this right, plz help
Message-Id: <Pine.GSO.4.10.10005050812000.6766-100000@user2.teleport.com>

On Fri, 5 May 2000, Robert Zakaria wrote:

> Subject: I thought i had this right, plz help

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

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

> @katalog = grep { /[^\.+]/ } readdir (KAT);

That's almost certainly not what you want. Check your pattern again.

> #checking if fil is older than 2 days
> if(-M $fil > 2) {

The most frequent mistake when mixing readdir with filetests in forgetting
that filetests look in the current directory - they don't have any
connection to the directory which readdir was reading.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 05 May 2000 18:41:09 +0100
From: nobull@mail.com
Subject: Inerpolating expressions (was: adding numbers in regexp)
Message-Id: <u966ssnbd6.fsf_-_@wcl-l.bham.ac.uk>

Lance Hoffmeyer <vibrato@my-deja.com> writes:

> In article <MPG.137ba376ff5609e798aa06@nntp.hpl.hp.com>,
>   Larry Rosler <lr@hpl.hp.com> wrote:

> >   perl -pibk -e "s/(Q5[A-F]_\d\d\s(\d\d))/$1-${\($2+1)}/" file
> 
> I assume brackets after a $ allow one to add, substract, and perform executions
> but why the backslash before the ($2+1)

${} in a double-qouted string (including the right operand of s///)
allows you to give an arbtirary expression that yeilds a reference to
a scalar and interpolate the value of that scalar.

\ is the "take a reference to" opertator.

So ${\(EXPR)} will interpolate the result of EXPR evaluated in a
scalar context.

Personally I think @{[EXPR]} is more readable (although probably less
efficient).  In this case EXPR is evaluated in a list context and
joined using space (or the current value of $" ) then interpolated.

BTW an alternative would be:

perl -pibk -e "s/(Q5[A-F]_\d\d\s(\d\d))/$1.'-'.($2+1)/e" file

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 5 May 2000 18:03:29 GMT
From: phukit@enteract.com
Subject: module data usage question
Message-Id: <8ev2dh$5no$1@news.enteract.com>

I apologize in advance if this is covered in any of the perldocs or in
the camel book.  I've been scouring them both for the last hour or so
trying to find this info, and I can't seem to find it.  I'm sure this
will be a simple question for someone to answer.
    
I've written a perl script, and now I'm writing a module to do perform
some functions that will be needed in other scripts that I'm writing.
    
In each script, I'll have a little configuration hash that contains
information that one of the subroutines in the module will need to do
its task properly.  The applicable parts of my script look like this:
    
use Mymodule;
    
my(%config) = (
    'server'    => "my.server.name.com",
    'user'      => "username",
    'password'  => "password",
    'db'        => "database",
    'table'     => "table",
    <snip several more configuration parameters>
);
    
my($dbh) = &Mymodule::DatabaseConnect();


The applicable parts of my module look like this:

package       Mymodule;
require       Exporter;
@ISA        = qw(Exporter);
@EXPORT     = qw( DatabaseConnect );

sub DatabaseConnect {
   <snip subroutine>
   return($dbh);
}

Now my question is this: How can I make the hash that I've defined in
my script available to the subroutine in the module?  Whenever I try
to look at $config{user} (or any other variable) from within
Mymodule::DatabaseConnect, all of the variables are undefined.

I know I could just pass the subroutine a list of configuration parameters
into its @_ when I call it, but this is a very large list of parameters and
would be a major pain to do.          
                                      
Thanks very much for any help you can offer,
David    



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

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

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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


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