[19313] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1508 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 13 11:10:40 2001

Date: Mon, 13 Aug 2001 08:10:17 -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: <997715416-v10-i1508@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 13 Aug 2001     Volume: 10 Number: 1508

Today's topics:
        Rounding a number plop740@mail.ru
    Re: Rounding a number (Rafael Garcia-Suarez)
    Re: Rounding a number (Tad McClellan)
    Re: Rounding a number NOSPAM@mail.ru
    Re: Rounding a number plop740@mail.ru
        Saving Parse::RecDescent Errors for Later Processing (Bob Dilworth)
    Re: Saving Parse::RecDescent Errors for Later Processin (Damian Conway)
    Re: Self-Searchable Perl documention - Extremely Useful <newspost@coppit.org>
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Touch a file with specific timestamp? <iltzu@sci.invalid>
    Re: Uploading a file via a browser w/out using CGI.pm (Vorxion)
    Re: Uploading a file via a browser w/out using CGI.pm <flavell@mail.cern.ch>
    Re: URL Encode <godzilla@stomp.stomp.tokyo>
    Re: URL Encode <ilya@martynov.org>
    Re: URL Encode (wade)
    Re: URL Encode <tony_curtis32@yahoo.com>
    Re: using Inline.pm to distribute binary perl modules <tinamue@zedat.fu-berlin.de>
        whither tchrist? (John Klassa)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 13 Aug 2001 03:54:40 +0000
From: plop740@mail.ru
Subject: Rounding a number
Message-Id: <umjentcklpd43vkedaldc5k8n4qc3q625b@4ax.com>

Hi,

For a financial application, we need to round numbers after 4, 5, 6
etc, decimals.

Not only PRINT only 4,5, or 6 decimals, but really round the numbers
before using them.

And of course, if the last decimal we keep is between 5 and 9, we
round UP, else we round down.

Any suggestion ?

Thanks :)

IB


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

Date: 13 Aug 2001 12:09:36 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Rounding a number
Message-Id: <slrn9nfh64.4ie.rgarciasuarez@rafael.kazibao.net>

plop740@mail.ru wrote in comp.lang.perl.misc:
} 
} For a financial application, we need to round numbers after 4, 5, 6
} etc, decimals.
} 
} Not only PRINT only 4,5, or 6 decimals, but really round the numbers
} before using them.
} 
} And of course, if the last decimal we keep is between 5 and 9, we
} round UP, else we round down.

Use sprintf :

    my $rounded = sprintf("%.4f", $x);

-- 
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/


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

Date: Mon, 13 Aug 2001 08:46:47 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Rounding a number
Message-Id: <slrn9nfj1n.48i.tadmc@tadmc26.august.net>

plop740@mail.ru <plop740@mail.ru> wrote:
>
>For a financial application, we need to round numbers after 4, 5, 6
>etc, decimals.


>Any suggestion ?


Yes. I suggest checking the Perl FAQs *before* posting to the
Perl newsgroup:

   perldoc -q round

      "Does Perl have a round() function?  What about ceil() and
       floor()?  Trig functions?"


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Mon, 13 Aug 2001 06:12:02 +0000
From: NOSPAM@mail.ru
Subject: Re: Rounding a number
Message-Id: <lorent07c2hjpusptmkh33p9vatpbs94gm@4ax.com>

On Mon, 13 Aug 2001 08:46:47 -0400, tadmc@augustmail.com (Tad
McClellan) wrote:

>plop740@mail.ru <plop740@mail.ru> wrote:
>>
>>For a financial application, we need to round numbers after 4, 5, 6
>>etc, decimals.
>
>
>>Any suggestion ?
>
>
>Yes. I suggest checking the Perl FAQs *before* posting to the
>Perl newsgroup:

Thanks for your GREAT help, indeed !

If anybody looks in Google, after 2 or 3 days, he will find ALL what
he wants !

So what's the use of this NG ? 

I asked another question  <pj56ntgu7kn27gvorbgudpuk6u8l31m8vq@4ax.com>
Of course I could find the reply myself, BUT posting it here brought
really a lot of interesting solutions, that will probably be usefull
to somebody else !

IB


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

Date: Mon, 13 Aug 2001 06:12:21 +0000
From: plop740@mail.ru
Subject: Re: Rounding a number
Message-Id: <rtrentkvrqq3tdmfbgu29j5q0c73dc4cf6@4ax.com>

On Mon, 13 Aug 2001 08:46:47 -0400, tadmc@augustmail.com (Tad
McClellan) wrote:

>plop740@mail.ru <plop740@mail.ru> wrote:
>>
>>For a financial application, we need to round numbers after 4, 5, 6
>>etc, decimals.
>
>
>>Any suggestion ?
>
>
>Yes. I suggest checking the Perl FAQs *before* posting to the
>Perl newsgroup:

Thanks for your GREAT help, indeed !

If anybody looks in Google, after 2 or 3 days, he will find ALL what
he wants !

So what's the use of this NG ? 

I asked another question  <pj56ntgu7kn27gvorbgudpuk6u8l31m8vq@4ax.com>
Of course I could find the reply myself, BUT posting it here brought
really a lot of interesting solutions, that will probably be usefull
to somebody else !

IB


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

Date: Mon, 13 Aug 2001 13:57:08 GMT
From: bdilworth@mco.edu (Bob Dilworth)
Subject: Saving Parse::RecDescent Errors for Later Processing
Message-Id: <3b77da36.4886098@news4u.mco.edu>

All:

Having recently discovered Parse::RecDescent and its high coolness
quotient I'm quickly finding uses for it in my Perl scripts.  One
thing I've discovered, however, is that there doesn't seem to be any
way to collect the parser-generated errors and use them later on in my
script (i.e., no PRD $error variable or the like).

I looked thorugh past clpm threads for possible solutions and found
one suggestion by Abigail, to wit:

>I don't think Parse::RecDescent has a hook for that (Damian, something
>for the todo list?), but you can always install a $SIG {__WARN__}
>handler and process the generated warnings.

Unfortunately there just isn't enough info in the above suggestion to
get me started.  I looked up SIGs in the Camel book (3rd edition) but
haven't been able to find anything that stands out in term of exactly
HOW to set up such a signal handler to capture and deal with PRD
generated errors.

So .... any suggestions, pointers, etc., etc.,  on any of the above
would be greatly appreciated.

Thanks in advance!!!!!

Bob Dilworth
Toledo, Ohio




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

Date: 13 Aug 2001 14:34:33 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Saving Parse::RecDescent Errors for Later Processing
Message-Id: <9l8oho$da9$1@towncrier.cc.monash.edu.au>

bdilworth@mco.edu (Bob Dilworth) writes:

>Having recently discovered Parse::RecDescent and its high coolness
>quotient I'm quickly finding uses for it in my Perl scripts.  One
>thing I've discovered, however, is that there doesn't seem to be any
>way to collect the parser-generated errors and use them later on in my
>script (i.e., no PRD $error variable or the like).

There's no "official" way (yet). A future release will allow you
to create pluggable OO error handlers. At the moment the best 
you can do is:


	startrule: try_this
		 | try_that
		 | try_the_other
		 | { ::do_something_with( $thisparser->{errors} ) }

$thisparser->{errors} will contain a reference to an array-of-arrays,
where each inner array contains the error message and the line number
it occurred at.

Damian


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

Date: Mon, 13 Aug 2001 09:31:44 -0400
From: David Coppit <newspost@coppit.org>
Subject: Re: Self-Searchable Perl documention - Extremely Useful!
Message-Id: <3B77D6C0.8020400@coppit.org>

John Holdsworth wrote:

> David Coppit <newspost@coppit.org> wrote in message news:<3B65AF04.2050906@coppit.org>...
>

>>The main reason I ask is that I'm interested in techniques for building 
>>web-based interfaces to Perl programs, and most Windows folks don't have 
>>web servers running on their machines.
> 
> David,
> 
> You got me thinking here and I've published a short example
> perl application with a browser interface (a version of du).
> This could be a .html file but a ".hta" removes the IE-ness.
> 
> http://www.openpsp.org/source/util/du.hta.gz


Hi John,

I couldn't get it to work with IE 5.5a. (It was also funny that I 
couldn't drop a .hta file on the IE window, but it would open it from 
your website okay...) Basically I'd get a single form entry in a window 
with a generic icon and no menus. Then I hit enter and ZoneAlarm told me 
it wanted network access (too bad it triggers that), but then nothing 
else happened.

By the way, another thought occurs to me. How about encapsulating all 
this in a class derived from CGI? The basic idea would be that I could 
take an existing CGI app, change "use CGI" to "use IECGI", drop the code 
into an .hta file, and BOOM! an instant local HTML interface to a Perl 
program. Drool....

I assume debuggin Perlscript is a pain. If so, people used to debugging 
CGI apps can develop using a standard web server, then move everything 
over to IECGI...

David



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

Date: Mon, 13 Aug 2001 13:36:56 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <tnflvo44lbrf72@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 06 Aug 2001 14:29:11 GMT and ending at
13 Aug 2001 14:17:28 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2001 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@(?:.*\.)?perl\.com
faq\@(?:.*\.)?denver\.pm\.org

Totals
======

Posters:  354
Articles: 1453 (555 with cutlined signatures)
Threads:  364
Volume generated: 2712.7 kb
    - headers:    1218.1 kb (23,670 lines)
    - bodies:     1416.1 kb (47,821 lines)
    - original:   832.5 kb (31,067 lines)
    - signatures: 77.1 kb (1,762 lines)

Original Content Rating: 0.588

Averages
========

Posts per poster: 4.1
    median: 1.0 post
    mode:   1 post - 178 posters
    s:      7.6 posts
Posts per thread: 4.0
    median: 3.0 posts
    mode:   1 post - 87 threads
    s:      6.3 posts
Message size: 1911.8 bytes
    - header:     858.4 bytes (16.3 lines)
    - body:       998.0 bytes (32.9 lines)
    - original:   586.7 bytes (21.4 lines)
    - signature:  54.3 bytes (1.2 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   68   160.8 ( 77.2/ 74.2/ 44.0)  tadmc@augustmail.com
   56   103.6 ( 43.3/ 60.3/ 24.3)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   46    71.2 ( 40.2/ 30.7/ 16.6)  Bart Lateur <bart.lateur@skynet.be>
   38    81.0 ( 41.6/ 39.4/ 21.1)  "Brent Dax" <brentdax1@earthlink.net>
   33    62.3 ( 24.4/ 37.0/ 30.4)  Carlos C . Gonzalez <miscellaneousemail@yahoo.com>
   32    69.0 ( 26.5/ 36.3/ 21.7)  mgjv@tradingpost.com.au
   32    66.5 ( 24.7/ 40.2/ 21.8)  Benjamin Goldberg <goldbb2@earthlink.net>
   32    71.3 ( 26.3/ 45.0/ 21.3)  Yves Orton <demerphq@hotmail.com>
   29    73.2 ( 25.2/ 46.0/ 37.3)  "Godzilla!" <godzilla@stomp.stomp.tokyo>
   28    39.0 ( 16.6/ 22.4/  9.2)  gnari <gnarinn@hotmail.com>

These posters accounted for 27.1% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

 160.8 ( 77.2/ 74.2/ 44.0)     68  tadmc@augustmail.com
 103.6 ( 43.3/ 60.3/ 24.3)     56  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
  81.0 ( 41.6/ 39.4/ 21.1)     38  "Brent Dax" <brentdax1@earthlink.net>
  73.2 ( 25.2/ 46.0/ 37.3)     29  "Godzilla!" <godzilla@stomp.stomp.tokyo>
  71.3 ( 26.3/ 45.0/ 21.3)     32  Yves Orton <demerphq@hotmail.com>
  71.2 ( 40.2/ 30.7/ 16.6)     46  Bart Lateur <bart.lateur@skynet.be>
  69.0 ( 26.5/ 36.3/ 21.7)     32  mgjv@tradingpost.com.au
  66.5 ( 24.7/ 40.2/ 21.8)     32  Benjamin Goldberg <goldbb2@earthlink.net>
  62.3 ( 24.4/ 37.0/ 30.4)     33  Carlos C . Gonzalez <miscellaneousemail@yahoo.com>
  56.5 ( 24.6/ 23.5/ 10.4)     24  Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>

These posters accounted for 30.1% of the total volume.

Top 10 Posters by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  3.1 /  3.1)      5  "Jeff Snoxell" <Jeff@aetherweb.co.uk>
0.985  (  3.6 /  3.7)      5  Roman Khutkyy <sky@mail.lviv.ua>
0.916  (  6.4 /  7.0)      8  jtjohnston <jtjohnston@courrier.usherb.ca>
0.839  (  6.9 /  8.2)      9  abigail@foad.org
0.823  ( 30.4 / 37.0)     33  Carlos C . Gonzalez <miscellaneousemail@yahoo.com>
0.809  ( 37.3 / 46.0)     29  "Godzilla!" <godzilla@stomp.stomp.tokyo>
0.787  (  3.2 /  4.1)      5  Mark Jason Dominus <mjd@plover.com>
0.773  (  4.0 /  5.2)      5  "Murat Uenalan" <murat.uenalan@gmx.de>
0.771  (  8.5 / 11.0)     11  "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
0.761  ( 12.8 / 16.8)     11  Logan Shaw <logan@cs.utexas.edu>

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.382  (  1.5 /  3.8)      5  "Sean Hamilton" <sh@planetquake.com>
0.378  (  1.5 /  3.9)      5  "Knob" <andrew.savige@ir.com>
0.369  (  1.1 /  2.9)      7  John Imrie <john.imrie@pa.press.net>
0.357  (  5.4 / 15.0)     27  Ilya Martynov <ilya@martynov.org>
0.351  (  1.8 /  5.1)      6  E.Chang <echang@netstorm.net>
0.345  (  5.3 / 15.5)     16  "Kevin Bartz" <l_pantin@hotmail.com>
0.331  (  1.2 /  3.7)      6  Eric <eric@mizuhocap.com>
0.328  (  3.3 / 10.0)     11  "Oliver" <ow22@nospam-cornell.edu>
0.247  (  6.1 / 24.6)     25  "John W. Krahn" <krahnj@acm.org>
0.236  (  0.5 /  2.3)      5  Tony Curtis <tony_curtis32@yahoo.com>

67 posters (18%) had at least five posts.

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   32  perldoc is like Greek to a beginner??
   22  Line counting in a file
   21  permuting extremely large string
   20  Comma's at end of list can break program??
   20  get rid of these leading zeros in Perl
   18  Perl editor for win32 needed
   17  how to test $X le 'z'
   16  Perl Logical Knot Problem
   16  Learning Perl, 2nd Edition
   16  Another string manipulation question

These threads accounted for 13.6% of all articles.

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  88.6 ( 29.9/ 56.4/ 33.9)     32  perldoc is like Greek to a beginner??
  54.4 ( 14.9/ 39.0/ 21.9)     16  Perl Logical Knot Problem
  52.2 ( 18.8/ 33.2/ 21.0)     21  permuting extremely large string
  39.9 ( 18.8/ 19.1/  8.9)     22  Line counting in a file
  39.7 ( 16.0/ 21.9/ 12.3)     20  Comma's at end of list can break program??
  30.2 ( 14.5/ 15.7/ 10.7)     18  Perl editor for win32 needed
  30.1 ( 14.0/ 15.8/  8.0)     15  launching a perl program not in a window
  29.8 ( 15.2/ 12.8/  6.1)     16  Another string manipulation question
  29.5 ( 12.2/ 15.1/  8.6)     14  Shouldn't sub foo {} be equivalent to sub foo {return} or sub foo {()} ?
  28.3 ( 13.4/ 13.4/  7.3)     14  q: converting strings

These threads accounted for 15.6% of the total volume.

Top 10 Threads by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.869  (  2.1/   2.4)      5  Change in Perl ENV variables.
0.841  ( 12.4/  14.8)      6  searching files from linux to Internet
0.816  (  5.0/   6.1)      5  databasing
0.798  (  3.5/   4.4)      5  Using a http proxy
0.770  (  5.1/   6.6)      5  Use versus Require (diff between using .pl and .pm)
0.769  (  3.5/   4.5)      6  how to get perlscript
0.754  (  5.8/   7.7)      7  Where are those !'s coming from?
0.744  (  8.9/  12.0)      5  Unexplained process killing
0.743  (  2.7/   3.7)     10  multiple line comments?
0.735  (  1.9/   2.6)      5  How could chomp the blanks of one sentence?

Bottom 10 Threads by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.389  (  2.6 /  6.7)      6  Perl with CGI with Cookies... HELP!
0.389  (  2.8 /  7.3)      6  cross reference?
0.375  (  1.8 /  4.8)      5  split(?)
0.372  (  3.6 /  9.6)      8  Advise on using perl to sort and give totals
0.369  (  2.3 /  6.2)      7  split with variable as PATTERN
0.369  (  2.3 /  6.3)      7  CGI.pm --> open FILE,">>file.txt";
0.362  (  1.3 /  3.5)      5  Perl 5.6 Pollute
0.308  (  4.6 / 15.0)     13  Coercing list context onto pair of regexps in a comparison
0.278  (  2.3 /  8.4)     10  q: launching a perl script from a perl script
0.214  (  2.2 / 10.4)      7  Pattern Matching: Which subpattern (rather than substring) was 
 matched?

110 threads (30%) had at least five posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      28  comp.lang.perl
      16  comp.lang.perl.modules
       8  alt.perl
       5  alt.comp.perlcgi.freelance
       2  comp.infosystems.www.authoring.misc
       2  comp.infosystems.www.servers.unix
       1  comp.answers
       1  news.answers
       1  comp.infosystems.www.authoring.html
       1  netscape.public.mozilla.layout

Top 10 Crossposters
===================

Articles  Address
--------  -------

       4  David Combs <dkcombs@panix.com>
       3  Mario Rizzuti <mariorizzuti@yahoo.com>
       3  Greg Andrews <gerg@panix.com>
       3  "Leo Hemmings" <leapius@hotmail.com>
       3  Dave Glason <dglason@home.com>
       3  slash@dot.c.o.m.org
       3  Emmett <emmettwa@onebox.com>
       3  gnari <gnarinn@hotmail.com>
       3  "Alan J. Flavell" <flavell@mail.cern.ch>
       3  vorxion@fairlite.com


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

Date: 13 Aug 2001 14:04:54 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Touch a file with specific timestamp?
Message-Id: <997711347.9611@itz.pp.sci.fi>

In article <slrn9mud22.tjn.mgjv@martien.heliotrope.home>, Martien Verbruggen wrote:
>
>I don't know whether utime is implemented on ActiveState's version of
>Perl, for example, but you should probably give it a try. It depends a
>bit on whether the Win API provides access to the file system to do
>things like this.

Even better, look at 'perldoc perlport' first:

       utime LIST
               Only the modification time is updated. (Mac OS,
               VMS, RISC OS)

               May not behave as expected.  Behavior depends on
               the C runtime library's implementation of utime(),
               and the filesystem being used.  The FAT filesystem
               typically does not support an "access time" field,
               and it may limit timestamps to a granularity of
               two seconds. (Win32)

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post something,
we discuss its implications.  If the discussion happens to answer a question
you've asked, that's incidental."           -- nobull in comp.lang.perl.misc



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

Date: 13 Aug 2001 05:28:12 -0400
From: vorxion@fairlite.com (Vorxion)
Subject: Re: Uploading a file via a browser w/out using CGI.pm
Message-Id: <3b779dac$1_1@news.iglou.com>

In article <9l75r7$1qv$1@neptunium.btinternet.com>, Leo Hemmings wrote:
>Hi all,
>
>I need to develop a script to upload files to a web server via a html form
>but without using CGI.pm. I have used CGI.pm to do this successfully but
>need to be able to do it without that module installed. I currently parse

Considered http://cgi-lib.berkeley.edu/  ?  I use that instead of CGI.pm.

-- 
Vorxion - Member of The Vortexa Elite


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

Date: Mon, 13 Aug 2001 13:40:18 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Uploading a file via a browser w/out using CGI.pm
Message-Id: <Pine.LNX.4.30.0108131337010.18502-100000@lxplus023.cern.ch>

On Aug 13, Vorxion twiddled the eigenstates thus:

> In article <9l75r7$1qv$1@neptunium.btinternet.com>, Leo Hemmings wrote:

> >I need to develop a script to upload files to a web server via a html form
> >but without using CGI.pm. I have used CGI.pm to do this successfully but
> >need to be able to do it without that module installed. I currently parse
>
> Considered http://cgi-lib.berkeley.edu/  ?  I use that instead of CGI.pm.

What's the point?  If the hon. Usenaut can install the one, he can
install the other.

When I set up a CGI script on a third-party server that has an antique
version of CGI.pm in their module library, I had no difficulty
installing a current version in an appropriate path accessible to me,
and telling the script via 'use lib' to make use of it.

[f'ups narrowed]

-- 
         "Always remember you're unique, just like everyone else."
               - I'm-no-Lady Polgara, quoting Anonymous




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

Date: Mon, 13 Aug 2001 00:24:07 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: URL Encode
Message-Id: <3B778097.7CCD6D9@stomp.stomp.tokyo>

jtjohnston wrote:
 
> Is there a way to url encode $message ?
 
> $message = "what a nice day it's going to be!"
 
> http://www.nowhere.com/something.cgi?$message
 
> whereby $message becomes:
 
> "what%20a%20nice%20day%20it's%20going%20to%20be%3f"


You may accomplish this task with one line of code.

$message = "what%20a%20nice%20day%20it's%20going%20to%20be%3f";


Godzilla!


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

Date: 13 Aug 2001 11:36:57 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: URL Encode
Message-Id: <87elqgv2au.fsf@abra.ru>


j> Is there a way to url encode $message ?
j> $message = "what a nice day it's going to be!"

j> http://www.nowhere.com/something.cgi?$message

j> whereby $message becomes:

j> "what%20a%20nice%20day%20it's%20going%20to%20be%3f"

use URI::Escape

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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

Date: 13 Aug 2001 03:04:42 -0700
From: jjchen@alumni.ice.ntnu.edu.tw (wade)
Subject: Re: URL Encode
Message-Id: <4259465b.0108130204.66fe197d@posting.google.com>

jtjohnston <jtjohnston@courrier.usherb.ca> wrote in message news:<3B776D65.6E4A85A4@courrier.usherb.ca>...
> Is there a way to url encode $message ?
> 
> $message = "what a nice day it's going to be!"
> 
> http://www.nowhere.com/something.cgi?$message
> 
> whereby $message becomes:
> 
> "what%20a%20nice%20day%20it's%20going%20to%20be%3f"

perldoc URI::Escape;


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

Date: 13 Aug 2001 07:12:34 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: URL Encode
Message-Id: <871ymgxiod.fsf@limey.hpcc.uh.edu>

>> On Mon, 13 Aug 2001 06:00:22 GMT,
>> jtjohnston <jtjohnston@courrier.usherb.ca> said:

> Is there a way to url encode $message ?  $message =
> "what a nice day it's going to be!"

> http://www.nowhere.com/something.cgi?$message

> whereby $message becomes:

> "what%20a%20nice%20day%20it's%20going%20to%20be%3f"

"perldoc URI" and use $uri_object->query($message).

If you want more control over which characters are
escaped, see "perldoc URI::Escape".

hth
t
-- 
Beep beep!  Out of my way, I'm a motorist!


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

Date: 13 Aug 2001 14:42:18 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: using Inline.pm to distribute binary perl modules
Message-Id: <9l8p0a$7vehh$1@fu-berlin.de>

Chris Dawson <cdawson@webiphany.com> wrote:
> Hi there,

> I have written a perl module using Inline.pm.  Fantastic module, I have to
> say.

ACK.

>  I now want to distribute the binary DLL that is created by Inline.  I
> have another win32 NT machine where I want to run this script, but this
> machine doesn't have any of the third-party libraries used to compile the C
> code, nor does it even have a developer environment with a c compiler or
> linker.

well, there's the FAQ (perldoc Inline-FAQ), where the author
gives you a little receipt how to distribute a module, with or
without the C source. the important thing is, you have to
compile it with the same c-compiler as the perl on the
destination machine was built with. so, in case of
ActivePerl you have to have Visual C++, for example (AFAIK).

hth,
tina

-- 
http://www.tinita.de \  enter__| |__the___ _ _ ___
tina's moviedatabase  \     / _` / _ \/ _ \ '_(_-< of
search & add comments  \    \ _,_\ __/\ __/_| /__/ perception
---   Warning: content of homepage hopelessly out-dated   ---


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

Date: Mon, 13 Aug 2001 13:17:28 -0000
From: klassa@cisco.com (John Klassa)
Subject: whither tchrist?
Message-Id: <slrn9nfkr4.q3s.klassa@godel.cisco.com>

What happened to Tom Christiansen?  Granted, I didn't go to the
conference this year, so I don't know if he was there...  Yet, he's
been silent here for a while, and I haven't seen any of his stuff
anywhere (or even seen him mentioned) in a while.  Long sabbatical?
Burnout?  Heavily involved in a new project?

Just curious.

-- 
John Klassa / Cisco Systems, Inc. / RTP, NC / USA / klassa@cisco.com / <><
        [ Save bits!  Don't quote entire threads in your reply. ]


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 1508
***************************************


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