[19213] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1408 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 30 14:10:46 2001

Date: Mon, 30 Jul 2001 11:10:11 -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: <996516611-v10-i1408@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 30 Jul 2001     Volume: 10 Number: 1408

Today's topics:
    Re: newbe question splitting a string into two differen (Helgi Briem)
    Re: newbe question splitting a string into two differen <ow22@nospam-cornell.edu>
    Re: newbe question splitting a string into two differen <godzilla@stomp.stomp.tokyo>
    Re: newbe question splitting a string into two differen <ow22@nospam-cornell.edu>
    Re: newbe question splitting a string into two differen <mbudash@sonic.net>
    Re: newbe question splitting a string into two differen <Tassilo.Parseval@post.rwth-aachen.de>
    Re: newbe question splitting a string into two differen <jeff@vpservices.com>
    Re: newbie fileio <ow22@nospam-cornell.edu>
    Re: Perl Docs (M.J.T. Guy)
        q->redirect('http://xyz.com/abc.html') Question <rlf@proimages.net>
    Re: q->redirect('http://xyz.com/abc.html') Question <rlf@proimages.net>
        q: newbie fileio <ow22@nospam-cornell.edu>
    Re: Self-Searchable Perl documention - Extremely Useful (John Holdsworth)
        Socket.pm errors (Don Bryant)
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: VVP: Displaying records 1 by 1? <jeff@vpservices.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 30 Jul 2001 15:05:03 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <3b657711.628333906@news.isholf.is>

On Mon, 30 Jul 2001 15:44:43 +0100, fred58 <none@nowere.com>
wrote:

>On Mon, 30 Jul 2001 16:20:52 +0200, "Svein Erling Seldal"
><Svein.Seldal@q-free.com> wrote:
>
>>my @list = split( /\|/,$input);
>>
>>Access them by $list[0], $list[1], etc.
>>
>>
>>Svein Erling Seldal
>
>ok i think you turned over two pages at once for me there i understand
>how the split works now so thanks for that and i understand how to
>access the split list as individual variables what i don't understand
>is how to split my string

>now i have the string to be split but how do i get my string into a
>scalar variable ie @list to split it into its individual parts 
>
my $vara = "hello | goodbuy";
my ($var1,$var2) = split /\|/,$vara;

And BTW, goodbye is not spelled goodbuy.  That
is a completely different word.

Regards,
Helgi Briem



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

Date: Mon, 30 Jul 2001 09:53:05 -0700
From: "Oliver" <ow22@nospam-cornell.edu>
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <9k43e4$mmv$1@news01.cit.cornell.edu>

can an anonymous array have undefined length?

"Tassilo von Parseval" <Tassilo.Parseval@post.rwth-aachen.de> wrote in
message news:3B6576C4.7060209@post.rwth-aachen.de...
> fred58 wrote:
>
> >ok i think you turned over two pages at once for me there i understand
> >how the split works now so thanks for that and i understand how to
> >access the split list as individual variables what i don't understand
> >is how to split my string
> >
> >$vara = "hello | goodbuy";
> >
>
> If your string is really "hello | goodbuy", then the following will do:
>
> ($first_part, $second_part) = split /\s+\|\s+/, $vara;
>
> which will assign $first_part = "hello" and $second_part = "goodbuy". It
> splits on '|' with an arbitrary number of whitespaces before and/or
> behind the pipe.
>
> The above construction is called an anonymous array. It is the same as:
>
> @array = split /\s+\|\s+/, $vara;
> $first_part = $array[0];
> $second_part = $array[1];
>
>
> Tassilo
>
> --
> Interestingly enough, since subroutine declarations can come anywhere,
> you wouldn't have to put BEGIN {} at the beginning, nor END {} at the
> end.  Interesting, no?  I wonder if Henry would like it. :-) --lwall
>
>




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

Date: Mon, 30 Jul 2001 10:37:16 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <3B659B4C.A58333AB@stomp.stomp.tokyo>

fred58 wrote:
 
> Right here is my problem i would like to split this string at the |
> "hello | good buy" into two different variables but im unsure of the
> best way to do this any help would be gratefully received
 
You have failed to provide clear and concise parameters.
There is no indication of you want to strip spaces from
your results.

It is a very poor programming practice to use metacharacters
for delimiters. This almost always leads to problems or extra
unwarranted code to compensate for metacharacter delimiters.

As to the best way, you will discover very few regulars here,
virtually none, give attention to speed and efficiency of
any given code. Writing code which is quick and efficient
is critical for Perl with its well earned reputation for
being slow and memory intensive.

For my test script below my signature, if you want to efficiently
strip spaces per your example string, this is a simple matter of
changing two lines of my code to this:

$variable_one = substr ($string, 0, index ($string, "|") - 1);
$variable_two = substr ($string, index ($string, "|") + 2);


I find amusement in noticing those whom responded to your
article all use the same variable names in their code and,
one carelessly fails to replicate your string parameters.


Godzilla!
--

TEST SCRIPT:
____________

#!perl

print "Content-type: text/plain\n\n";

$string = "hello | good buy";

$variable_one = substr ($string, 0, index ($string, "|"));
$variable_two = substr ($string, index ($string, "|") + 1);

print "Variable One: $variable_one\nVariable Two: $variable_two";

exit;

PRINTED RESULTS:
________________

Variable One: hello 
Variable Two:  good buy


BENCHMARK TESTING:
__________________

#!perl

print "Content-type: text/plain\n\n";

use Benchmark;

print "Run One:\n\n";
&Time;

print "\n\nRun Two:\n\n";
&Time;

print "\n\nRun Three:\n\n";
&Time;


sub Time
 {
  timethese (100000,
  {
   'name1' =>
   '$string = "hello | good buy";
    $variable_one = substr ($string, 0, index ($string, "|"));
    $variable_two = substr ($string, index ($string, "|") + 1);',

   'name2' =>
   '$vara = "hello | good buy";
    ($first_part, $second_part) = split /\s+\|\s+/, $vara;',

   'name3' =>
   '$vara = "hello | good buy";
    @array = split /\s+\|\s+/, $vara;
    $first_part = $array[0];
    $second_part = $array[1];',

   'name4' =>
   'my $vara = "hello | goodbuy";
    my ($var1,$var2) = split /\|/,$vara;',

  } );
 }


PRINTED RESULTS:
________________

Run One:

Benchmark: timing 100000 iterations of name1, name2, name3, name4...
 name1:  0 wallclock secs ( 0.44 usr +  0.00 sys =  0.44 CPU) @ 227272.73/s
 name2:  2 wallclock secs ( 1.05 usr +  0.00 sys =  1.05 CPU) @ 95238.10/s
 name3:  1 wallclock secs ( 1.15 usr +  0.00 sys =  1.15 CPU) @ 86956.52/s
 name4:  1 wallclock secs ( 0.60 usr +  0.00 sys =  0.60 CPU) @ 166666.67/s


Run Two:

Benchmark: timing 100000 iterations of name1, name2, name3, name4...
 name1:  0 wallclock secs ( 0.44 usr +  0.00 sys =  0.44 CPU) @ 227272.73/s
 name2:  1 wallclock secs ( 1.04 usr +  0.00 sys =  1.04 CPU) @ 96153.85/s
 name3:  1 wallclock secs ( 1.15 usr +  0.00 sys =  1.15 CPU) @ 86956.52/s
 name4:  1 wallclock secs ( 0.61 usr +  0.00 sys =  0.61 CPU) @ 163934.43/s


Run Three:

Benchmark: timing 100000 iterations of name1, name2, name3, name4...
 name1:  1 wallclock secs ( 0.44 usr +  0.00 sys =  0.44 CPU) @ 227272.73/s
 name2:  1 wallclock secs ( 1.04 usr +  0.00 sys =  1.04 CPU) @ 96153.85/s
 name3:  1 wallclock secs ( 1.15 usr +  0.00 sys =  1.15 CPU) @ 86956.52/s
 name4:  1 wallclock secs ( 0.61 usr +  0.00 sys =  0.61 CPU) @ 163934.43/s


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

Date: Mon, 30 Jul 2001 10:45:30 -0700
From: "Oliver" <ow22@nospam-cornell.edu>
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <9k46ge$q9e$1@news01.cit.cornell.edu>

i have a slightly harder question, how could i split a string like

      hello      good    bye  1  444

into an array of strings (hello,good,bye,1,444). basically i have these
strings that are seperated by an arbitary number of spaces, and i need to
get them into an array. okay thanks in advance

oliver


"fred58" <none@nowere.com> wrote in message
news:3roamt4jqf75g3ierd9qic6d8m8ar42dvj@4ax.com...
> Right here is my problem i would like to split this string at the |
> "hello | good buy" into two different variables but im unsure of the
> best way to do this any help would be gratefully received
>
> Thanks
>




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

Date: Mon, 30 Jul 2001 17:48:39 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <mbudash-A80583.10484630072001@news.sonic.net>

In article <9k46ge$q9e$1@news01.cit.cornell.edu>, "Oliver" 
<ow22@nospam-cornell.edu> wrote:

> "fred58" <none@nowere.com> wrote in message
> news:3roamt4jqf75g3ierd9qic6d8m8ar42dvj@4ax.com...
> > Right here is my problem i would like to split this string at the |
> > "hello | good buy" into two different variables but im unsure of the
> > best way to do this any help would be gratefully received.
> >
> 
> i have a slightly harder question, how could i split a string like
> 
>       hello      good    bye  1  444
> 
> into an array of strings (hello,good,bye,1,444). basically i have these
> strings that are seperated by an arbitary number of spaces, and i need to
> get them into an array. okay thanks in advance

perldoc -f split

$string = 'hello      good    bye  1  444';
@array_of_strings = split(/\s+/, $string);

hth-
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: Mon, 30 Jul 2001 19:52:03 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <3B659EC3.80209@post.rwth-aachen.de>

Oliver wrote:

>can an anonymous array have undefined length?
>

What is an undefined length? In Perl diction the length of an array is 
undefined, when it is 0. That is, even an anonymous array (or list) 
could have an undefined length:

sub return_empty_list {
    return ( );
}

The above will return an empty list with undefined length. Creating 
empty and anonymous lists however doesn't seem to me very useful except 
for creating references, such as

$a = [ ];
$a->[0] = "first element";

 .
Tassilo


PS: Your reply should come below the original post, not on top of it.



-- 
Hi Jimbo.  Dennis.  Really appreciate the help on the income tax.  You wanna
help on the audit now?
		-- "The Rockford Files"




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

Date: Mon, 30 Jul 2001 10:51:37 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <3B659EA9.EDA66DA5@vpservices.com>

Oliver wrote:
> 
> i have a slightly harder question, how could i split a string like
> 
>       hello      good    bye  1  444
> 
> into an array of strings (hello,good,bye,1,444). basically i have these
> strings that are seperated by an arbitary number of spaces, and i need to
> get them into an array. okay thanks in advance

In the perl language, one says "an arbitrary number of spaces" like
this: \s*.  If you don't want to include a situation in which there are
0 spaces (like there are between the two "l"s in the word "hello"), it's
like this: \s+.  Thus:

 my $str    = "       hello      good    bye  1  444";
 my @array  = split /\s+/, $str;

But this is all *very* simple stuff.  You might want to consider reading
up on perl basics.

-- 
Jeff



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

Date: Mon, 30 Jul 2001 09:50:18 -0700
From: "Oliver" <ow22@nospam-cornell.edu>
Subject: Re: newbie fileio
Message-Id: <9k438t$ml3$1@news01.cit.cornell.edu>

oops im sorry i posted without reading recent postings, seems my question
was almost answered.

"Oliver" <ow22@nospam-cornell.edu> wrote in message
news:9k434q$mkp$1@news01.cit.cornell.edu...
> Hi, i was wondering how i can read a file up to a specified character,
like
> say i have in the file:
>
> a | b | c | d
>
> and i want to read in 4 different values (a,b,c and d) how could i go
about
> doing that? thanks a lot
>
> oliver
>
>




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

Date: 30 Jul 2001 16:08:22 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Perl Docs
Message-Id: <9k40pm$j7k$1@pegasus.csx.cam.ac.uk>

Doug McGrath <doug.mcgrath@us.telegyr.com> wrote:
>
>I'm a reasonably good tech writer and a reasonably decent programmer.
>I've recently spent about 8 hours tracking down a weird problem that
>would've never happened if a simple note existed in the Perl docs that
>cross-referenced two functions. (For some, the technique is probably
>old hat, but it happened to be something I had never used before.)
>
>I also see occasional grammatical problems, broken links in the HTML
>version of the POD (which is what I use exclusively), and just plain
>bad writing.
>
>How do I go about submitting changes for inclusion in future releases
>of Perl?

Bugs and deficiencies in the Perl documentation are considered to be
bugs in Perl, and should be reported in the same way as bugs in the code.

See	perldoc perlbug

Your comments / suggested changes are more likely to be appreciated /
acted on if accompanied by a proposed patch, preferably in "diff -u"
format.    See Porting/patching.pod in the Perl distribution for
more details.

TIA


Mike Guy


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

Date: Mon, 30 Jul 2001 10:36:18 -0700
From: Robert Fonda <rlf@proimages.net>
Subject: q->redirect('http://xyz.com/abc.html') Question
Message-Id: <3B659B12.EE906A7D@proimages.net>


When I used the redirect() CGI method in my script, I get the following
message (note, the URL has been changed to protect the innocent):

Status: 302 Moved location: http://xyz.com/abc.html 

It's the last statement in my script before the end_html() statement.

So what am I doing wrong?

Thanks,
Robert


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

Date: Mon, 30 Jul 2001 10:40:25 -0700
From: Robert Fonda <rlf@proimages.net>
Subject: Re: q->redirect('http://xyz.com/abc.html') Question
Message-Id: <3B659C09.A6EE30F4@proimages.net>

My appologies, I figured it out. 

Thanks again.


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

Date: Mon, 30 Jul 2001 09:48:07 -0700
From: "Oliver" <ow22@nospam-cornell.edu>
Subject: q: newbie fileio
Message-Id: <9k434q$mkp$1@news01.cit.cornell.edu>

Hi, i was wondering how i can read a file up to a specified character, like
say i have in the file:

a | b | c | d

and i want to read in 4 different values (a,b,c and d) how could i go about
doing that? thanks a lot

oliver




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

Date: 30 Jul 2001 09:18:46 -0700
From: coldwave@bigfoot.com (John Holdsworth)
Subject: Re: Self-Searchable Perl documention - Extremely Useful!
Message-Id: <2a46b11e.0107300818.6f9e54d@posting.google.com>

Jeff Zucker <jeff@vpservices.com> wrote in message news:<3B5F5415.BFCB4D59@vpservices.com>...

> The part that turns me off is the "inside Internet Explorer" bit since I
> have a distinct aversion to things that require a specific browser
> (especailly that specific browser :-)).  But your server-inside-a-page
> concept sounds pretty neat.  I'll check it out.

I'm no greater fan of Mr Gates and coy than anybody else but alas
PerlScript is only availale for IE.

I've produced a more generic version that will search any
document directory available here:

http://www.openpsp.org/source/util/search.html.gz

Simply unzip this HTML document into the root of the
documentation and you can search it!

enjoy,

john
coldwave@thunder.it


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

Date: 30 Jul 2001 10:48:59 -0700
From: donbryant@webmd.net (Don Bryant)
Subject: Socket.pm errors
Message-Id: <7985f1bb.0107300948.6a4d9524@posting.google.com>

I am receiving the following message occasionally when using the
NET::Ftp module and I don't really understand what it means. Comments
anyone.

<snip>
get{sock, peer}name() on closed fd at
/usr/lib/perl5/5.00503/i386-linux/IO/Socket.pm line 274.
Use of uninitialized value at
/usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295.
Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be
16 at /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295.
<snip>

The message implies that an error has occured during a get operation
to an FTP host. By the time this message is issued the FTP host has
been logged into successfully and should support a valid connection.
Is there anyway I can trap for this error to:
1) Determine what line in my program the erro occurs at.
2) How do negotiate the error gracefully.

Thanks for your interest,

Don Bryant


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

Date: Mon, 30 Jul 2001 16:51:56 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <tmb45cfdf7r6bf@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 23 Jul 2001 17:58:52 GMT and ending at
30 Jul 2001 14:55:44 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:  353
Articles: 1036 (392 with cutlined signatures)
Threads:  331
Volume generated: 1853.8 kb
    - headers:    839.2 kb (16,928 lines)
    - bodies:     960.2 kb (32,516 lines)
    - original:   592.7 kb (21,994 lines)
    - signatures: 53.3 kb (1,227 lines)

Original Content Rating: 0.617

Averages
========

Posts per poster: 2.9
    median: 1 post
    mode:   1 post - 189 posters
    s:      5.2 posts
Posts per thread: 3.1
    median: 2 posts
    mode:   1 post - 101 threads
    s:      3.8 posts
Message size: 1832.3 bytes
    - header:     829.5 bytes (16.3 lines)
    - body:       949.1 bytes (31.4 lines)
    - original:   585.8 bytes (21.2 lines)
    - signature:  52.6 bytes (1.2 lines)

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

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

   40    89.3 ( 35.4/ 50.4/ 36.3)  "Godzilla!" <godzilla@stomp.stomp.tokyo>
   35    81.8 ( 27.0/ 53.2/ 31.4)  Benjamin Goldberg <goldbb2@earthlink.net>
   30    42.4 ( 25.1/ 17.1/  7.5)  Bart Lateur <bart.lateur@skynet.be>
   28    55.7 ( 20.4/ 35.3/ 15.5)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   27    55.0 ( 22.4/ 31.5/ 11.6)  Michael Budash <mbudash@sonic.net>
   25    42.3 ( 23.4/ 18.6/ 11.4)  Jeff Zucker <jeff@vpservices.com>
   24    44.6 ( 19.4/ 16.3/  4.8)  Ilya Martynov <ilya@martynov.org>
   22    38.6 ( 15.9/ 21.0/ 11.3)  nobull@mail.com
   22    34.9 ( 20.2/ 11.0/  7.9)  "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
   21    36.0 ( 16.8/ 18.5/  5.2)  "John W. Krahn" <krahnj@acm.org>

These posters accounted for 26.4% of all articles.

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

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

  89.3 ( 35.4/ 50.4/ 36.3)     40  "Godzilla!" <godzilla@stomp.stomp.tokyo>
  81.8 ( 27.0/ 53.2/ 31.4)     35  Benjamin Goldberg <goldbb2@earthlink.net>
  55.7 ( 20.4/ 35.3/ 15.5)     28  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
  55.0 ( 22.4/ 31.5/ 11.6)     27  Michael Budash <mbudash@sonic.net>
  44.6 ( 19.4/ 16.3/  4.8)     24  Ilya Martynov <ilya@martynov.org>
  42.4 ( 25.1/ 17.1/  7.5)     30  Bart Lateur <bart.lateur@skynet.be>
  42.3 ( 23.4/ 18.6/ 11.4)     25  Jeff Zucker <jeff@vpservices.com>
  38.6 ( 15.9/ 21.0/ 11.3)     22  nobull@mail.com
  36.0 ( 16.8/ 18.5/  5.2)     21  "John W. Krahn" <krahnj@acm.org>
  34.9 ( 20.2/ 11.0/  7.9)     22  "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>

These posters accounted for 28.1% of the total volume.

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

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

0.985  ( 10.8 / 11.0)     12  abigail@foad.org
0.781  ( 17.6 / 22.5)     11  Logan Shaw <logan@cs.utexas.edu>
0.736  (  4.4 /  6.0)      5  "Stefan Weiss" <weiss@kung.foo.at>
0.730  ( 10.0 / 13.7)     13  =?ISO-8859-1?Q?Thomas_B=E4tzler?= <Thomas@Baetzler.de>
0.721  ( 36.3 / 50.4)     40  "Godzilla!" <godzilla@stomp.stomp.tokyo>
0.713  (  7.9 / 11.0)     22  "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li>
0.697  (  3.1 /  4.4)     10  Paul Johnston <paul.johnston@dsvr.co.uk>
0.673  (  5.2 /  7.7)      6  Ilmari Karonen <usenet11530@itz.pp.sci.fi>
0.673  (  5.2 /  7.8)      5  "Brian D. Green" <greenbd@u.washington.edu>
0.668  (  1.4 /  2.0)      5  "Tom Melly" <tom.melly@ccl.com>

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

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

0.439  ( 15.5 / 35.3)     28  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
0.414  (  1.9 /  4.6)      6  Andras Malatinszky <andras@mortgagestats.com>
0.382  (  1.6 /  4.2)      7  dbe@todbe.com
0.380  (  2.3 /  6.0)     10  MMX166+2 . 1G HD <no@mail.addr>
0.378  (  1.9 /  5.2)      5  Sebastian <dethtoll@yahoo.com>
0.370  ( 11.6 / 31.5)     27  Michael Budash <mbudash@sonic.net>
0.351  (  1.7 /  5.0)      6  "Johannes B." <johannes_be@gmx.de>
0.297  (  4.8 / 16.3)     24  Ilya Martynov <ilya@martynov.org>
0.285  (  1.1 /  4.0)      5  Buggs <buggs-clpm@splashground.de>
0.280  (  5.2 / 18.5)     21  "John W. Krahn" <krahnj@acm.org>

43 posters (12%) had at least five posts.

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

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

   17  Stripping extention from a filename in a string
   13  Regular expression question.
   13  Who can help me about the confused (..) operator?
   13  Sorting an array of strings by 'closeness' to another string
   13  Image Size
   12  Extract the relative sorting of items from multiple lists
   12  Splitting Peculiar HTML
   12  Substitute _last_ occurrece in string?
   12  CGI:standard
   11  What am I doing wrong with this command line ?

These threads accounted for 12.4% of all articles.

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

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

  52.4 ( 11.4/ 38.9/ 25.8)     13  Sorting an array of strings by 'closeness' to another string
  29.8 ( 14.4/ 15.2/  7.6)     17  Stripping extention from a filename in a string
  28.8 (  8.6/ 19.9/  8.9)     10  counting
  28.0 ( 10.1/ 17.4/ 10.1)     12  Extract the relative sorting of items from multiple lists
  27.7 ( 11.2/ 11.1/  7.1)     13  Regular expression question.
  27.5 ( 11.2/ 16.0/  9.1)     12  CGI:standard
  27.0 (  5.9/ 20.7/ 18.8)      8  Finding a word in a sorted list.
  23.4 ( 13.2/  8.9/  3.9)     13  Who can help me about the confused (..) operator?
  22.3 ( 10.2/ 12.0/  7.4)     12  Substitute _last_ occurrece in string?
  21.7 ( 10.1/ 10.8/  4.0)     12  Splitting Peculiar HTML

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.910  ( 18.8/  20.7)      8  Finding a word in a sorted list.
0.814  (  3.5/   4.3)      5  Multi tuple hashes
0.800  (  5.8/   7.2)      5  don't laugh (case usage for variables)
0.773  (  4.0/   5.2)      7  Matching 6 Numbers To Each Other
0.768  (  4.5/   5.8)      6  chess in perl
0.735  (  9.1/  12.3)      6  Regular Expression Reduction
0.728  (  7.1/   9.7)     10  Escaped period! Someone apprehend it!
0.726  (  2.2/   3.1)      5  call a sub defined in a script from the command line
0.719  (  3.8/   5.3)      5  string extraction
0.710  (  2.5/   3.5)      5  Simple Substitute Question

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

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

0.443  (  4.1 /  9.3)      5  Informix IDS2000 and Zope/Python/Perl/PHP on Linux
0.442  (  3.9 /  8.9)     13  Who can help me about the confused (..) operator?
0.441  (  2.2 /  5.1)      7  IO::Socket-Question
0.429  (  2.9 /  6.7)      9  Regular Expression
0.425  (  2.1 /  5.0)      5  suid support in Perl
0.421  (  2.6 /  6.2)      5  dynamically resizing pictures for a web page
0.404  (  2.7 /  6.7)      7  emacs etags default in cperl mode
0.404  (  2.9 /  7.3)      5  sortlen -- filter to sort text by line length
0.391  (  1.7 /  4.3)      5  sizes of strings in Activeperl ?
0.375  (  4.0 / 10.8)     12  Splitting Peculiar HTML

67 threads (20%) had at least five posts.

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

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

      17  comp.lang.perl.modules
      16  alt.perl
      13  comp.lang.perl
       8  gnu.emacs.help
       5  comp.databases.informix
       5  comp.lang.python
       4  comp.databases.ms-sqlserver
       4  comp.unix.shell
       4  comp.infosystems.www.authoring.misc
       4  comp.unix.questions

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

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

       8  mnd999@hotmail.com
       6  "Mike S." <yeah@right.com>
       5  Jeff Zucker <jeff@vpservices.com>
       4  stephh <stephh@nospam.com>
       4  "M.L." <mel2000@hotmaildot.com>
       4  badarik@yahoo.com
       3  Sebastian <dethtoll@yahoo.com>
       3  Michael Budash <mbudash@sonic.net>
       3  Ilya Zakharevich <nospam-abuse@ilyaz.org>
       3  Petasis George <petasis@iit.demokritos.gr>


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

Date: Mon, 30 Jul 2001 09:12:59 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: VVP: Displaying records 1 by 1?
Message-Id: <3B65878B.D748A49B@vpservices.com>

vivekvp wrote:

[Victor, please don't send personal responses when someone answers your
question in the newsgroup, or if you do, put a note at the top saying
that's what you're doing.  Thanks!]

[like this:  Complimentary copy of this clpm posting sent to "Victor
Prasad" <vprasad@nortelnetworks.com>]

> Yes -I am using an informix Database - but I want to use Perl as the
> interface to the web.

That doesn't really change anything about your posting.  Whether you use
Perl or anything else you still need to a) find out what the next and
previous records are -- only your database can tell you that and b) put
it in a CGI form -- only a discussion on web authoring and CGI can help
you there.

> I want to use Perl code to output the data to the web by interfacing
> with the Informix database via ODBC (setup and working fine.)

So, it's still the same as what I suggested earlier:  

1) use ODBC (and presumably DBI) to find out what the current record is
and what the previous and next records from it are; a LIMIT clause is
the easiest way unless your query produces IDs in a set sequence without
holes.

2) use an HTML form to display the current record and to create a form
that embeds the unique IDs of the next and previous records learned in
step #1

3) use CGI to recieve the IDs from the form created in step #2 and use
that as the basis for the next query and loop back to step #1

> I do not want to use Informix 4gls to output the data to the web.

But you need to be able to either repeat the original query on each user
request or to store the entire query in 

4) some sort of persistence scheme

> Possible with Perl?

Yes, it is all possible with Perl but the Perl parts are fairly simple
compared to the rest  Perl will be how you do it, but the strategy is
all database and CGI stuff.  It seems (and I could be wrong) what you
are lacking is an understanding of how CGI scripts pass information back
and forth.  That is an issue for a CGI related newsgroup.  Or if there
is a particular part of the process that you don't know how to do in
Perl, tell us what that is, which of the steps I outlined above you are
having problems with.

Or you may be better off taking another poster's suggestion to use the
HTML::Pager module which takes care of the CGI logic for you.

-- 
Jeff



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

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


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