[13765] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1176 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 27 21:27:17 1999

Date: Wed, 27 Oct 1999 18:27:05 -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: <941074025-v9-i1176@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 27 Oct 1999     Volume: 9 Number: 1176

Today's topics:
        comparing time? <zhuang@ic.sunysb.edu>
    Re: comparing time? (Abigail)
    Re: comparing time? <zhuang@ic.sunysb.edu>
    Re: comparing time? <rootbeer@redcat.com>
    Re: comparing time? (Abigail)
    Re: comparing time? <webmaster@webdream.com>
    Re: comparing time? <lr@hpl.hp.com>
    Re: comparing to html files <mauro@franchisetech.com>
    Re: correction... <dvoon@my-deja.com>
        CPAN 1.50 on HP-UX 11.0 problem (S.T. Wong)
    Re: crypt function (hymie!)
        DB advice whos_john_galt@my-deja.com
        DB Files extensions <ericnew@pacific.net.sg>
    Re: DB Files extensions <gellyfish@gellyfish.com>
        DBI Module help <nigh_postal@my-deja.com>
    Re: DBI Module help simon@whitestar99.demon.co.uk
    Re: DBI Module help <MHasenoehrl@de.lhsgroup.de>
    Re: DBI::myql Problem <MHasenoehrl@de.lhsgroup.de>
        Debugging from CGI (Jeff Givens)
    Re: Debugging from CGI (Jeff Givens)
    Re: Debugging from CGI (Clinton Pierce)
    Re: Debugging from CGI (Clinton Pierce)
    Re: Debugging from CGI (Jeff Givens)
        documentation for perl/gtk <sjs@yorku.ca>
        downloaded emails appended to file, want to pick out th (kevin anderson)
    Re: downloaded emails appended to file, want to pick ou <rootbeer@redcat.com>
    Re: downloaded emails appended to file, want to pick ou <AgitatorsBand@yahoo.com>
        Drive Space <ywang@harvard.edu>
    Re: Drive Space (Steve Mayer)
        Drop the last item from the Environment string (CGI) <wyzelli@yahoo.com>
    Re: Drop the last item from the Environment string (CGI <rootbeer@redcat.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 25 Oct 1999 11:45:10 -0400
From: "Z. Huang" <zhuang@ic.sunysb.edu>
Subject: comparing time?
Message-Id: <38147B06.F6D08E71@ic.sunysb.edu>

Hi,

     I'm new to perl. Can anyone tell me how to compare time in a simple
way. Suppose I want to compare a time with 9:10am, what will be the
code? Any hint is greatly appreciated.


Zhengao Huang




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

Date: 27 Oct 1999 07:07:15 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: comparing time?
Message-Id: <slrn81dqmn.bjj.abigail@alexandra.delanet.com>

Z. Huang (zhuang@ic.sunysb.edu) wrote on MMCCXLVIII September MCMXCIII in
<URL:news:381672E4.26C20705@ic.sunysb.edu>:
__ 
__    Thanks for your reply. I use the following code:
__        $time = localtime();
__        if ($time>'9:40pm') {}
__ The problem is the condition is alway true even if it is now 9:00pm. Any hint is
__ greatly appreciated.


A stealth cc-ed Jeopardy posting, about a problem that would become
clear if you either read the docs, or use -w. And then you expect us
to solve your problem?

Get real.



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 26 Oct 1999 23:35:00 -0400
From: "Z. Huang" <zhuang@ic.sunysb.edu>
Subject: Re: comparing time?
Message-Id: <381672E4.26C20705@ic.sunysb.edu>


   Thanks for your reply. I use the following code:
       $time = localtime();
       if ($time>'9:40pm') {}
The problem is the condition is alway true even if it is now 9:00pm. Any hint is
greatly appreciated.

>
> That will depend in which format you have the time, wouldn't it?
>
> If:    if ($time eq '9:10am') { ... }
>
> doesn't work for you, formulate a more detailed question.
>
> Abigail
> --
> sub A::TIESCALAR{bless\my$x=>A};package B;@q=qw/Hacker Another
> Perl Just/;use overload'""'=>sub{pop @q};sub A::FETCH{bless\my
> $y=>B}; tie my $shoe => 'A';print "$shoe $shoe $shoe $shoe\n";
>
>   -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
>    http://www.newsfeeds.com       The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----



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

Date: Tue, 26 Oct 1999 21:28:33 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: comparing time?
Message-Id: <Pine.GSO.4.10.9910262126170.29843-100000@user2.teleport.com>

On Tue, 26 Oct 1999, Z. Huang wrote:

>    Thanks for your reply. I use the following code:
>        $time = localtime();
>        if ($time>'9:40pm') {}
> The problem is the condition is alway true even if it is now 9:00pm. 

I'd think it should always be false. 

But try converting the time into a simple scalar number - such as the
standard Unix time format - and you can simply compare those. For doing
the conversions, see CPAN, the docs,  and the FAQ. Cheers!

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



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

Date: 25 Oct 1999 15:23:06 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: comparing time?
Message-Id: <slrn819f0h.fji.abigail@alexandra.delanet.com>

Z. Huang (zhuang@ic.sunysb.edu) wrote on MMCCXLVI September MCMXCIII in
<URL:news:38147B06.F6D08E71@ic.sunysb.edu>:
[] 
[]      I'm new to perl. Can anyone tell me how to compare time in a simple
[] way. Suppose I want to compare a time with 9:10am, what will be the
[] code? Any hint is greatly appreciated.


That will depend in which format you have the time, wouldn't it?

If:    if ($time eq '9:10am') { ... }

doesn't work for you, formulate a more detailed question.



Abigail
-- 
sub A::TIESCALAR{bless\my$x=>A};package B;@q=qw/Hacker Another
Perl Just/;use overload'""'=>sub{pop @q};sub A::FETCH{bless\my
$y=>B}; tie my $shoe => 'A';print "$shoe $shoe $shoe $shoe\n";


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 25 Oct 1999 17:39:11 GMT
From: "Craig Vincent" <webmaster@webdream.com>
Subject: Re: comparing time?
Message-Id: <3B0R3.462$Bx2.500@198.235.216.4>

>      I'm new to perl. Can anyone tell me how to compare time in a simple
> way. Suppose I want to compare a time with 9:10am, what will be the
> code? Any hint is greatly appreciated.

Take a look at the Date::Calc module.  It has really helped me out with
doing
time and date calculations.

Craig Vincent




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

Date: Mon, 25 Oct 1999 10:47:00 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: comparing time?
Message-Id: <MPG.127e376e4f0adb9a98a121@nntp.hpl.hp.com>

In article <38147B06.F6D08E71@ic.sunysb.edu> on Mon, 25 Oct 1999 
11:45:10 -0400, Z. Huang <zhuang@ic.sunysb.edu> says...
>      I'm new to perl. Can anyone tell me how to compare time in a simple
> way. Suppose I want to compare a time with 9:10am, what will be the
> code? Any hint is greatly appreciated.

Use the timelocal() function in the module Time::Local (which is part of 
the standard perldistribution) to convert each of the times to be 
compared into an integer, whose units are epoch seconds.  Then compare 
the integers.

perldoc Time::Local

perldoc -f localtime # for more about the arguments to timelocal().

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


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

Date: Mon, 25 Oct 1999 14:27:31 +0200
From: "Mauro Quartini" <mauro@franchisetech.com>
Subject: Re: comparing to html files
Message-Id: <3814513c_3@news.vic.com>


Eric Bohlman <ebohlman@netcom.com> wrote in message
news:7uk63r$553$4@nntp3.atl.mindspring.net...
> Mauro Quartini (mauro@franchisetech.com) wrote:
> : I need a perl code to compare 2 html files and to highlight the
differences.
> : Let's say I need to mark (using an image or a comment) in the 2nd file
> : _only_ the changes.
> : I need to distinguish between html tag changes and simple text changes.
>
> The way I'd do it would be to use James Clark's nsgmls (available for all
> major platforms) to parse both html files into ESIS format, run the ESIS
> files through a diff utility (which you'll already have on a Unix
> platform; you'll have to look around for one if you're on a Windows
> platform, but I'm pretty sure it's been ported), and then use some Perl
> code to take the diff output and the second ESIS file and recreate the
> second HTML file from them.  ESIS format basically puts each HTML
> "thingy" (start tag, end tag, attribute, text, etc.) on a line of its
> own, with the first character indicating what type of "thingy" it is.
> This will require that both HTML files be valid HTML.
>


Thank you a lot

Mauro Quartini
mauro@franchisetech.com





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

Date: Tue, 26 Oct 1999 04:27:18 GMT
From: dVoon <dvoon@my-deja.com>
Subject: Re: correction...
Message-Id: <7v3aj4$a9m$1@nnrp1.deja.com>

Sorry, my previous answer was slightly over-done. Actually it can be
simpler:
my @num = ($stuff =~ /(\d+)/g);

One more thing, the above example will match all numbers regardless if
the number is a whole word or part of a word with non-digit characters.
Another word, if $stuff contains "Item ax123 has quantity of 100", it
will match both "123", and "100". So, drop the anchors if you want
digit-only word.

Daniel


In article <7v35cj$6or$1@nnrp1.deja.com>,
  dVoon <dvoon@my-deja.com> wrote:
> If there's always only one number in a variable, then:
> my $num = ($stuff =~ /\D*(\d+)\D*/);
>
> If there are more then one, then:
> my @num = ($stuff =~ /\D*(\d+)\D*/g);
>
> I think you know what to do if you want it to match decimal numbers as
> well :)
>
> Have nice day.
>
> Daniel
>
> In article <3814d0b1@rsl2.rslnet.net>,
>   deplib@citytel.net wrote:
> > Hello All:
> >
> > I'm still trying to find out how to pull numbers ONLY out of a
> variable.
> > Let's say I have a variable $stuff.
> >
> > $stuff = "This line has a number 498 in it"
> >
> > Now how do I pull JUST the number out of it?
> >
> > I know that \d in a regex matches any digit and
> > m/(\d+\.?\d*|\.\d+)/g
> > will extract all numbers from a string (from the Perl Cookbook)
> >
> > But I don't know how to use the above to pull
> > 498
> > from $stuff
> >
> > All advice welcome
> >
> > Joe Zelwietro
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


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


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

Date: 25 Oct 1999 16:17:22 GMT
From: st@logic.csc.cuhk.edu.hk (S.T. Wong)
Subject: CPAN 1.50 on HP-UX 11.0 problem
Message-Id: <7v1vqj$ive$1@justice.csc.cuhk.edu.hk>

Hello,

I am using Perl 5.00502 on HP-UX 11.0.  However, after upgrading CPAN to 1.50,
I got this error when try to install anything through CPAN:

*****************************************************************************

cpan> install Bundle::CPAN
Running make for KJALB/File-Spec-0.7.tar.gz

  Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
  if you just type
      install Bundle::libnet


  Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
  if you just type
      install Bundle::libnet


Trying with "/usr/local/bin/lynx -source" to get
    ftp://ftp.pacific.net.hk/pub/mirror/CPAN/authors/id/KJALB/CHECKSUMS
Can't locate object method "new" via package "MD5" at /usr/local/lib/perl5/5.005
02/CPAN.pm line 3282.

*****************************************************************************

I tried to install Digest::MD5 (through CPAN or source code) before/after 
upgrading to CPAN 1.50, but failed in all cases.

Would anyone please help ?  Thanks a lot.

Regards,
ST Wong 

--
S.T. Wong                           | Email: st-wong@cuhk.edu.hk


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

Date: 25 Oct 1999 18:38:23 GMT
From: hymie@lactose.smart.net (hymie!)
Subject: Re: crypt function
Message-Id: <7v282v$g2$1@news.smart.net>

In our last episode, the evil Dr. Lacto had captured our hero,
  "Mohd Idaham" <techam@tm.net.my>, who said:

>Assume the /etc/passwd value is hello99.
>If user entered hello99123 or hello99bla..bla... the program will accept and
>print ok.

This is a bad example.  The problem probably is that UNIX passwords are
only significant to eight characters.

>Can anybody tell me why and how to overcome this.

You won't be able to.

root# perl -e 'print crypt("hello9","aa"),"\n";'    
aaPs7iIp8UD9M           # six characters
root# perl -e 'print crypt("hello99","aa"),"\n";'   
aafqxMApqmcTo           # seven characters
root# perl -e 'print crypt("hello991","aa"),"\n";'  
aa15k8WGOkeUE           # eight characters
root# perl -e 'print crypt("hello9912","aa"),"\n";' 
aa15k8WGOkeUE           # nine characters -- no change from eight
root# perl -e 'print crypt("hello99123","aa"),"\n";'
aa15k8WGOkeUE           # ten characters -- no change from nine

 ..hymie!         http://www.smart.net/~hymowitz         hymie@lactose.smart.net
===============================================================================
This world's got a lot of space, and if they don't like my face, it ain't me
that's going anywhere, no.  So I don't care. Let 'em laugh at me if that's the
fare I have to pay to be free. Then, baby, laugh at me. And I'll cry for you.
                                                                   --Sonny Bono
===============================================================================


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

Date: Wed, 27 Oct 1999 09:33:06 GMT
From: whos_john_galt@my-deja.com
Subject: DB advice
Message-Id: <7v6gsi$jha$1@nnrp1.deja.com>

Hello,

Thanks is advance.

I use several scripts to manage a fair sized database. Currently I use
text files with comma separated values. I haven't any problems with the
text files, but the database may soon be growing exponentially and I am
thinking it may be wise to grow up use real database files.

I am a virgin when it comes to modules...but am gaining confidence with
the recent article on DBI at www.perl.com.

I would greatly appreciate any advice one could offer on my
introduction to databases.

Thanks again.

Joey


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


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

Date: Mon, 25 Oct 1999 19:19:32 +0800
From: "Eric New" <ericnew@pacific.net.sg>
Subject: DB Files extensions
Message-Id: <38143b15.0@news.cyberway.com.sg>

just wondering why some db files have extensions .dir and .pag while others
just have a single .db?

is it some modules i'm missing or some installation steps i've missed out?

eric




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

Date: 25 Oct 1999 12:26:04 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: DB Files extensions
Message-Id: <38143e4c_1@newsread3.dircon.co.uk>

Eric New <ericnew@pacific.net.sg> wrote:
> just wondering why some db files have extensions .dir and .pag while others
> just have a single .db?
> 
> is it some modules i'm missing or some installation steps i've missed out?
> 

Its to do with the particular implementation of DBM that is making the files.


/J\
-- 
"The only man in the cabinet who supported them was that fucking lunatic
Redwood" - John Major


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

Date: Tue, 26 Oct 1999 14:26:07 GMT
From: nigh_postal <nigh_postal@my-deja.com>
Subject: DBI Module help
Message-Id: <7v4dlr$2kl$1@nnrp1.deja.com>

    I am trying to write an ecommerce program in perl using the mysql
portion of the DBI module.  I have a couple questions that I hope
somebody can help me with.  I need a way to grab the column names for a
particular table and store them into an array.  I know you can do this
with using fetchrow_hashref, etc.. but I need to be able to do this even
if the table is empty.  I have the O'Reilly book on Mysql, but I
couldn't find anything on this in it.  Perhaps I missed it.

    My second question has to do with the fetchrow_hashref command
itself.  I find it slightly odd that they provide a fetchrow_array and
fetchrow_arrayref, but only provide the fetchrow_hashref function for
dealing with hashes.  I'm sure they have a good reason for this, but I
can't for the life of me figure out why.  And the fetchrow_hashref
command doesn't seem to work properly.  The O'Reilly book treats the
results of a call to it like a normal hash, even though the function
returns a reference to a hash.  So originally I was getting the odd
number of indecies in hash error.  Then I tried dereferencing the
results, and it still didn't work quite right. Has anybody else run into
this problem?  Or am I just crazy ?

-Cody


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


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

Date: Tue, 26 Oct 1999 15:29:47 GMT
From: simon@whitestar99.demon.co.uk
Subject: Re: DBI Module help
Message-Id: <7v4hd7$5fo$1@nnrp1.deja.com>

Just a quick response but if mySQL supports the 'DESCRIBE' command
(can't remember if it does or not) then you could just parse the
results of the SQL command 'DESCRIBE TABLE <table name>'.

Just a thought.

Simon


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


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

Date: Tue, 26 Oct 1999 18:52:00 +0200
From: "Markus Hasenöhrl" <MHasenoehrl@de.lhsgroup.de>
Subject: Re: DBI Module help
Message-Id: <3815dc30@news.lhsgroup.com>

nigh_postal
>    I am trying to write an ecommerce program in perl using the mysql
>portion of the DBI module.  I have a couple questions that I hope
>somebody can help me with.  I need a way to grab the column names for a
>particular table and store them into an array.  I know you can do this
>with using fetchrow_hashref, etc.. but I need to be able to do this even
>if the table is empty.  I have the O'Reilly book on Mysql, but I
>couldn't find anything on this in it.  Perhaps I missed it.
>


In the recent version of DBI there are NAME and NAME_lc elements ín a
statement-handler object.
They give you a reference to an array containing the column names. Do a
perldoc DBI to find out more.
e.g:

$dhb=DBI::....

$sth=$dbh->prepare("select * from table1");
$sth->execute;
print  "column names are: " , join " ", @{$sth->{NAME}};

prints out all column names of table "table1" (even if empty).





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

Date: Tue, 26 Oct 1999 19:19:00 +0200
From: "Markus Hasenöhrl" <MHasenoehrl@de.lhsgroup.de>
Subject: Re: DBI::myql Problem
Message-Id: <3815e284@news.lhsgroup.com>


erik_lembke@my-deja.com wrote
>I don't understand following syntaz in the DBI modulde.
>if i prepare and execute a insert sql statement like this:
>my $in = $dbh->prepare($sql-statement);
>$in->execute
>following thus not work:
>$newindex = $in->insertdid;
>but if use thisL
>$newindex = $in->{insertid};
>it does work well.
>
Q: What is the difference?
>(OK execute is in DBI and insertid is in DBD::mysql, but why i have
>to use the anonymous hash reference?????)


You have to understand that your variable $in is a object (a blessed
reference in Perl - in this case a blessed hash-ref.).
Therefore  $in->insertdid would be a call of the function "insertid" in the
namespace $in's namespace which obviously does not exist.
$in->{insertid} is equal to $in->{'insertid'} or even $$in{'insertid'} and
is just the syntax of accessing a hash-element via key 'insertid' and
hashref $in.
It has nothing to do with anonymous hash references.





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

Date: Tue, 26 Oct 1999 18:31:59 GMT
From: jgivensXX@adelphiaXX.netXX (Jeff Givens)
Subject: Debugging from CGI
Message-Id: <3816f1d1.21925981@nntp>

How can I debug my perl scripts when they are accepting input from CGI?

The best I have found to do is to print out the input string back into the
browser and then pasting this into the script and knocking out the input
read routines.

I then can run the script with the simulated input.

There must be a way to run my browser, CGI and have the debugger run the
script while inputting from the CGI.

Using the ActiveState GUI debugger.
_________________________________________________________________
JG...                                                 Jeff Givens
         mailto:jgivensXX@adelphiaXX.netXX

"My hovercraft is full of eels."


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

Date: Wed, 27 Oct 1999 03:56:43 GMT
From: jgivensXX@adelphiaXX.netXX (Jeff Givens)
Subject: Re: Debugging from CGI
Message-Id: <3816778a.17301296@nntp>

On Tue, 26 Oct 1999 23:36:13 GMT clintp@geeksalad.org (Clinton Pierce)
wrote:

>Software development is a messy, messy thing!

Thank you for the advice anyway but, short of having a hobby of this, I
would hate to set myself back projectwise a day by having to reload stuff
that I have been figuring out in bits and pieces. It's not like unzip
something and off you go again.

So I shall plod along unless something sweet comes and bites me in the ass.
_________________________________________________________________
JG...                                                 Jeff Givens
         mailto:jgivensXX@adelphiaXX.netXX

"My hovercraft is full of eels."


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

Date: Tue, 26 Oct 1999 23:36:13 GMT
From: clintp@geeksalad.org (Clinton Pierce)
Subject: Re: Debugging from CGI
Message-Id: <38183a61.348324145@news.roalok1.mi.home.com>

On Tue, 26 Oct 1999 20:50:48 GMT, jgivensXX@adelphiaXX.netXX (Jeff
Givens) wrote:
>On Tue, 26 Oct 1999 19:36:18 GMT cpierce1@ford.com (Clinton Pierce) wrote:
>>The GUI debugger (ptkdb?) featured in the last issue of the Perl Journal
>
>I don't think that is for me. I checked it out and there is a monster file
>of perl to install and it looks like I could trash my nicely work perl
>win98 (ActiveState) config.

Software development is a messy, messy thing!

It might take you months, years or decades but you will learn that
eventually...

 ...or give up and get a job driving a taxi.

-- 
"If you rush a Miracle Man, you get rotten miracles"
                     --Miracle Max, The Princess Bride
http://www.geeksalad.org


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

Date: Tue, 26 Oct 1999 19:36:18 GMT
From: cpierce1@ford.com (Clinton Pierce)
Subject: Re: Debugging from CGI
Message-Id: <381a010f.1824709613@news.ford.com>

On Tue, 26 Oct 1999 18:31:59 GMT, jgivensXX@adelphiaXX.netXX (Jeff Givens)
wrote:
>How can I debug my perl scripts when they are accepting input from CGI?
>
>The best I have found to do is to print out the input string back into the
>browser and then pasting this into the script and knocking out the input
>read routines.
>
>I then can run the script with the simulated input.
>
>There must be a way to run my browser, CGI and have the debugger run the
>script while inputting from the CGI.
>
>Using the ActiveState GUI debugger.

The GUI debugger (ptkdb?) featured in the last issue of the Perl Journal
can deal with CGI scripts and the browser just fine.  I saw a demo of it
at TPC, and tried it out myself.

The command-line debugger ("perl -d") isn't so bad either, and you can
type your parameters when prompted and run it like any other script.



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

Date: Tue, 26 Oct 1999 20:50:48 GMT
From: jgivensXX@adelphiaXX.netXX (Jeff Givens)
Subject: Re: Debugging from CGI
Message-Id: <381713c9.30623867@nntp>

On Tue, 26 Oct 1999 19:36:18 GMT cpierce1@ford.com (Clinton Pierce) wrote:

>The GUI debugger (ptkdb?) featured in the last issue of the Perl Journal

I don't think that is for me. I checked it out and there is a monster file
of perl to install and it looks like I could trash my nicely work perl
win98 (ActiveState) config.

The ActiveState debugger is nice but I would like it to invoke when the CGI
is ready for it.

Any other ideas?
_________________________________________________________________
JG...                                                 Jeff Givens
         mailto:jgivensXX@adelphiaXX.netXX

"My hovercraft is full of eels."


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

Date: 22 Oct 1999 23:53:01 -0500
From: Steven Smolinski <sjs@yorku.ca>
Subject: documentation for perl/gtk
Message-Id: <m3vh7y4r0y.fsf@hank.yorku.ca>

Does anyone know of any tutorials/documentation on how to properly use
Gtk.pm?  There's no pod in the module, and it isn't *exactly* like the
bindings in C.

TIA.

Steve


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

Date: Wed, 27 Oct 1999 08:06:51 GMT
From: andersjk@sol-invictus.org (kevin anderson)
Subject: downloaded emails appended to file, want to pick out the  info...
Message-Id: <3816afc3.513722313@news.isar.de>

Hi all,

i just need a pointer in the right direction!! the rest i should be
able to figure out...

we get these email leads so far my program logs into the pop3 server
on a sun machine and retrieves just the body and appends all messages
to file.  this 'data' file has then for example 10 email bodies they
all have the same format for example

name: 	joe blow
company: 	blah blah inc.

and so on about seven 'fields' i would like to have the name, company
etc. formated in another file like comma delimited so it reads the
'data' file picks out 'name' 'company' and writes to data1 in a row

joe blow, blah blah inc.,user@host.com
mr.smith,ork ork inc, user@host.com

till the whole 'data' file is read then extracted to data1 

i see that while(<>) reads line by line etc...

i just need to see the path how to get there... then i can reverse
engineer, unless this is too complicated... i am a newbie...be
gentle...

thanks in advance,

kevin anderson...

sages say the path is narrow and difficult to tread, narrow as the
edge of raZor....


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

Date: Wed, 27 Oct 1999 11:07:52 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: downloaded emails appended to file, want to pick out the  info...
Message-Id: <Pine.GSO.4.10.9910271106330.29843-100000@user2.teleport.com>

On Wed, 27 Oct 1999, kevin anderson wrote:

> i just need to see the path how to get there... 

There are some modules on CPAN for working with email. If that's not what
you want, it would probably be good to ask a question when you post a
request. Cheers!

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



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

Date: Wed, 27 Oct 1999 22:26:49 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: downloaded emails appended to file, want to pick out the  info...
Message-Id: <J_KR3.1774$LR3.316079@news.shore.net>

kevin anderson <andersjk@sol-invictus.org> wrote:
: we get these email leads so far my program logs into the pop3 server
: on a sun machine and retrieves just the body and appends all messages
: to file.  this 'data' file has then for example 10 email bodies they
: all have the same format for example

: name: 	joe blow
: company: 	blah blah inc.

So at the point that your (hypothetical) perl script is supposed to start,
this data file has already been created, right?

: joe blow, blah blah inc.,user@host.com
: mr.smith,ork ork inc, user@host.com

: till the whole 'data' file is read then extracted to data1 

: i see that while(<>) reads line by line etc...

Presumably you have some sort of marker in "data" to tell when you've
reached the end of one record, right? 

Basically what you want to do is read in each line and split it on the ":"
(perldoc -f split). You'll probably want to create a hash with the
left-hand part as the key and the right-hand part as the value.

Then, when you reach the end of the record, you have all the data you need
in the hash... write it out in whatever order you want (probably using the
"join" function) and clear out the hash (you could probably just set it to
an empty list). 

Does that help you get started? If so, come back when you have a little
code written and we can probably help you through the rough spots.

--Art

-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Wed, 27 Oct 1999 11:44:21 -0400
From: Yi Wang <ywang@harvard.edu>
Subject: Drive Space
Message-Id: <38171DD5.8CDC2EB4@harvard.edu>

Anyone knows how to check on how much drive space free on a win95 system
in perl?

Yi



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

Date: 27 Oct 1999 16:45:14 GMT
From: smayer@smayer-pc.us.oracle.com (Steve Mayer)
Subject: Re: Drive Space
Message-Id: <slrn81eb0q.4v3.smayer@smayer-pc.us.oracle.com>

In article <38171DD5.8CDC2EB4@harvard.edu>, Yi Wang wrote:
>Anyone knows how to check on how much drive space free on a win95 system
>in perl?
>
>Yi
>

Yi,

  Try the Win32::DriveInfo module.  
  It can be grabbed from http://base.dux.ru/guest/fno/perl/

  Good luck,

Steve

-- 
=============================================================
Steve Mayer				Oracle Corporation
Senior Member of Technical Staff	1211 SW 5th Ave.
Application Server Group QA		Suite 900
smayer@us.oracle.com			Portland, OR 97204 
Phone:  503-525-3127
=============================================================


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

Date: Wed, 27 Oct 1999 15:42:10 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Drop the last item from the Environment string (CGI)
Message-Id: <0JwR3.16$oC2.1722@vic.nntp.telstra.net>

I have been pondering this and wonder if anyone can give me a better way..

I need to drop the last item from a CGI environment (POST), everything after
the & before the last item.  I need to lose the full name=value pair.

Does anyone know a simple way to do this?

So far I have been splitting the string, and then joining it on '&' without
the offending variable, but this seems horribly kludgey.  I was wondering if
anyone had anything better.

Wyzelli




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

Date: Wed, 27 Oct 1999 11:00:33 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Drop the last item from the Environment string (CGI)
Message-Id: <Pine.GSO.4.10.9910271054440.29843-100000@user2.teleport.com>

On Wed, 27 Oct 1999, Wyzelli wrote:

> I need to drop the last item from a CGI environment (POST), everything
> after the & before the last item.  I need to lose the full name=value
> pair.
> 
> Does anyone know a simple way to do this?

This request is unclear. Here are two possible interpretations.

1. You want to make a CGI program which ignores part of its input. (Why?)
You can do this with the CGI module, though, by simply ignoring or
deleting the item.

2. You want to make a new CGI request out of an old one. This should be
possible with the CGI module as well, using the query_string function.
You'll probably want LWP to submit the request.

Cheers!

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



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

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


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