[13746] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1156 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 23 01:05:29 1999

Date: Fri, 22 Oct 1999 22:05:08 -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: <940655107-v9-i1156@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 22 Oct 1999     Volume: 9 Number: 1156

Today's topics:
        A Shoutcast Server in Perl <none@home.here>
        ANN: make your app's manual or your app's site quickly! <info@visualvision.it>
    Re: Can I use flock as lever to create reliable unique  (Ben Blish)
    Re: Can't do "make" on perl module (Brett W. McCoy)
    Re: file sorting (Michael Budash)
    Re: file sorting <bwalton@rochester.rr.com>
    Re: formatting text with filling '.'s <lr@hpl.hp.com>
    Re: gd.pm 1.19 <bwalton@rochester.rr.com>
    Re: Help substituting '/' ? <rick.delaney@home.com>
    Re: How can I join two hashes? <dan@tuatha.sidhe.org>
    Re: how do you run cgi scripts on a NT (Brett W. McCoy)
    Re: how do you run cgi scripts on a NT <wyzelli@yahoo.com>
    Re: newbie (David H. Adler)
        Newbie: graphic counter:shes-a no work! <DCK@oldmanhonda.com>
    Re: passing an array as a hash value? <flavell@mail.cern.ch>
    Re: passing an array as a hash value? <bwalton@rochester.rr.com>
    Re: Perl and shadow passwords nate237@my-deja.com
        perl on windows ? <fred@cocohost.com>
        Perl vs. REBOL <bz9t@yahoo.com>
    Re: Reference challenge <rick.delaney@home.com>
    Re: Regular Expression problem <bwalton@rochester.rr.com>
        robust telnet solution? <corlando@MUNGEpop.phnx.uswest.net>
    Re: seeking past 4GB <elaine@chaos.wustl.edu>
    Re: string question (Michael Budash)
    Re: string question <bwalton@rochester.rr.com>
    Re: string question <sswaminathan@micron.com>
    Re: tough regex problem <@mdo.net>
    Re: WIN .EXE files from PERL <sswaminathan@micron.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 23 Oct 1999 01:32:21 +0100
From: "John Smith" <none@home.here>
Subject: A Shoutcast Server in Perl
Message-Id: <01bf1ce5$e6ec5640$325a6ac0@default>

Hello everybody,
Is here anyone who can help me about setting up a Shoutcast Server
(for mp3 streaming) written in Perl language?
[I think the source would not be so huge but is impossible to find it out
and
I'm not very expert about this lang]

THANX FOR YOUR HELP GuYz! ;)

John 


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

Date: Sat, 23 Oct 1999 02:25:41 +0200
From: Visual Vision <info@visualvision.it>
Subject: ANN: make your app's manual or your app's site quickly!
Message-Id: <38110085.7AD308FF@visualvision.it>

Small, powerful and easy: there is a new software for the hypertext
world, iPer (win 95-98-NT).
Web pages, e-books, application manuals, WinHelps, CDs without effort,
with a single tool.
Facts, not words: if you are interested, you can get free trials at:
http://visualvision.it/ipere/ (you can also buy on-line)
Be productive in 5 minutes, choose iPer!

VV Staff
--
---------------------------------------------------------------
Visual Vision, hypertext with ease!
 http://visualvision.it/e/      82, V.le Riviera
                                Pietra Ligure ITALY
[ASP member]                    fax +39-019-625520
---------------------------------------------------------------


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

Date: Sat, 23 Oct 1999 04:13:06 GMT
From: bblishA@TblackbeltDO.Tcom (Ben Blish)
Subject: Re: Can I use flock as lever to create reliable unique cookie values?
Message-Id: <381134d0.1808724@news.montanavision.net>

On Fri, 22 Oct 1999 14:04:28 -0700, Tom Phoenix <rootbeer@redcat.com> wrote:

[re flock return value, etc.]

>Should be true for success, false upon failure.

Thanks, Tom. After posting (of course) I figured out that
LOCK_EX is exclusive and waits (blocks, new term to me
in this context) so no loop etc. is required. Simple.

I do wish that there were better docs than the perldocs
archive, but it's "muddleable". :)

Regards,
Ben




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

Date: Sat, 23 Oct 1999 01:16:16 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: Can't do "make" on perl module
Message-Id: <slrn8123bn.s18.bmccoy@moebius.foiservices.com>

Also Sprach Dutch McElvy <dutch@mindspring.com>:

>I can run perl programs on my linuxppc distribution but for some reason when
>I try to install a perl module, I can do a "Makefile.PL" but when I try to
>do a make for the perl module I get a bash "make" command not recognized.

You don't have make installed on your system, or it's not in your path.
ou may want to drop into one of the Linux newsgroups for more help on
this, as it's not really a Perl issue but a Linux issue.

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


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

Date: Fri, 22 Oct 1999 17:46:57 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: file sorting
Message-Id: <mbudash-2210991746570001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <3810F6CE.B4906BF0@pikesville.net>, "V.B."
<spyder@pikesville.net> wrote:

>HI!
>im still in the "newbie" learning stages,,
>i have a file,,, myfile.ext, it contains multiple single line entries,
>each entry contains 7 ";" delimited values,,, id like to sort the file
>by the 5th value of each entry,,,.
>if read the sort faq and perlman , but it only confused me ,,, if anyone
>can point me in the direction of a good example, id be overjoyed!
>thankyou!

i know you're asking in a perl newsgroup, but have you thought of
investigating the shell's 'sort' command? this of course assumes that
you're talking *nix...

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


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

Date: Fri, 22 Oct 1999 21:41:51 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: file sorting
Message-Id: <3811125F.A037888A@rochester.rr.com>

"V.B." wrote:
 ...
> i have a file,,, myfile.ext, it contains multiple single line entries,
> each entry contains 7 ";" delimited values,,, id like to sort the file
> by the 5th value of each entry,,,.
> if read the sort faq and perlman , but it only confused me ,,, if anyone
> can point me in the direction of a good example, id be overjoyed!
 ...
Try:

open IN,"myfile.ext" or die "Oops, open trouble, $!\n";
print for(sort {(split /;/,$a)[4] cmp (split /;/,$b)[4]} <IN>);
close IN or die "Oops, close trouble, $!\n";

You don't say if you need a numeric or lexical sort.  If you need a 
numeric sort, replace cmp above with <=> .  You also don't say if
you want it ascending or descending.  If descending, switch $a and
$b above.  The above will generate the output on standard output.

Of course, you could always do:

system('sort -t\; +4 <myfile.ext >mysortedfile.ext');

if you have an operating system.
-- 
Bob Walton


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

Date: Fri, 22 Oct 1999 17:35:27 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: formatting text with filling '.'s
Message-Id: <MPG.127aa2aa633046c298a108@nntp.hpl.hp.com>

In article <19991023.442200@broken.Ecd.East.Sun.COM> on Sat, 23 Oct 1999 
00:44:22 GMT, Frank Mower <Frank.Mower@East.sun.com> says...

 ...

> How about using the maximum string width option in printf:
> 
> printf "%.18s%s\n", $item . "." x 18, $price;

That can be done just as easily (and faster) with substr:

  print substr($item . '.' x 18, 0, 18), $price, "\n";

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


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

Date: Fri, 22 Oct 1999 23:27:34 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: gd.pm 1.19
Message-Id: <38112B26.2B683C3F@rochester.rr.com>

Gregorio Caraballo wrote:
> 
> Where can I get the old version of GD (1.19) for WinNT?
> 
> Thank you

You can get 1.18 from the first edition of the Perl Resource Kit
for Win32.  That version supports .gif's; the latest version from
ActiveState doesn't.  Sorry, I don't know where you can get 1.19.
-- 
Bob Walton


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

Date: Sat, 23 Oct 1999 02:43:52 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Help substituting '/' ?
Message-Id: <381120F7.4DC96839@home.com>

[posted & mailed]

Larry Rosler wrote:
> 
> In article <380F8FDC.EE10C402@home.com> on Thu, 21 Oct 1999 22:12:33
> GMT, Rick Delaney <rick.delaney@home.com> says...
> >
> > You can use alphanumeric delimiters.
> >
> >     $line =~ s g/ggg;
> >
> > You can also use the quicker op.
> >
> >     $line =~ y d/ddd;
> 
> You'd better not leave out the space in either of those constructs!
> 
> But where is this behavior documented?  The only statement about the
> delimiters in perlop (under s///) reads:
> 
>   Any non-alphanumeric, non-whitespace delimiter may replace the
> slashes.

Which is true.

> There is no statement at all under tr///.

Well, there is *something* (which is also under s///).

    If the SEARCHLIST is delimited by bracketing quotes, 
    the REPLACEMENTLIST has its own pair of quotes, 
    which may or may not be bracketing quotes, e.g.,
        tr[A-Z][a-z] or tr(+\-*/)/ABCD/. 


> So there is surely an error here, either in the documentation or in the
> overly-liberal implementation.

While there is an omission in the docs for both ops, I'd really only
call tr's an error.  Does anyone really need to know that they can use
alphanumeric delimiters?

The implementation could probably be fixed to exclude alphanumerics but
I doubt anyone has ever been burned by this.  The real implementation
error would be using this code in anything other than JAPHs.

Now, having said that, and having just used this code outside of a JAPH,
I'd like to apologize to all those rushing to change the delimiters in
their production code to their first initial.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sat, 23 Oct 1999 02:42:45 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: How can I join two hashes?
Message-Id: <Fg9Q3.276$cP2.1252@news.rdc1.ct.home.com>

Erik van Roode <newsposter@cthulhu.demon.nl> wrote:
> Tom Phoenix <rootbeer@redcat.com> wrote:
>> On 22 Oct 1999, Erik van Roode wrote:

>>> my %hash = (%hash1, %hash2);

>> For larger hashes, this should be equivalent, but (potentially much)
>> faster.

>>     my %hash = %hash1;
>>     @hash{ keys %hash2 } = values %hash2;

> timethese(100, {
>   add1  => sub { my %hash = (%hash1, %hash2); },
>   add2  => sub { my %hash = %hash1; @hash{ keys %hash2 } = values %hash2; },
> });
> ----------------------------------------------------------------
> dantest0, perl5.00404
> Benchmark: timing 100 iterations of add1, add2...
>       add1: 16 secs (16.91 usr  0.03 sys = 16.94 cpu)
>       add2: 21 secs (20.02 usr  0.01 sys = 20.03 cpu)

Now that's interesting. The second method should take up significantly less
memory at runtime (about half, if the hashes are of equivalent size) which
could make a difference if they were big enough to cause some paging
activity.

Wonder why things were as slow as they were.

					Dan


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

Date: Sat, 23 Oct 1999 01:20:54 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: how do you run cgi scripts on a NT
Message-Id: <slrn8123kd.s18.bmccoy@moebius.foiservices.com>

Also Sprach frank velasquez <viper@hal-pc.org>:

>i'm have some problems running cgi scripts on my server, they are
>in the cgi director  but when i run the script i get an error message that
>says

You might be better off looking at your server's configuration in more
detail.  Your description is far too vague for anyone to make even a
preliminary diagnosis without knowing more about how your system is setup.

And this is a Perl newsgroup, not a CGI or NT newsgroup.  Don't mean to
sound snobby, but this really isn't the right crowd.

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


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

Date: Sat, 23 Oct 1999 12:10:59 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: how do you run cgi scripts on a NT
Message-Id: <Ye9Q3.4$Sf2.1907@vic.nntp.telstra.net>

frank velasquez <viper@hal-pc.org> wrote in message
news:7uqiu5$uar$1@news.hal-pc.org...
> i'm have some problems running cgi scripts on my server, they are
> in the cgi director  but when i run the script i get an error message that
> says
>
> %1 this is not a valid NT application
> help me i don't know what to do
> reply by email greatly appreciated
> pakix2000@hotmail.com
>
Is Activeperl installed on your server?

Are you running IIS or Apache?

The documentation on how to configure both to run Perl scripts is in the
Activeperl distribution (Start-Programs-Activeperl-Online Documentation)

It sounds as if your server does not know what do do with the script.

Wyzelli




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

Date: 22 Oct 1999 20:12:21 -0400
From: dha@panix.com (David H. Adler)
Subject: Re: newbie
Message-Id: <slrn811vb5.gnv.dha@panix.com>

On Fri, 22 Oct 1999 12:16:18 GMT, Johannes <jspangen@my-deja.com> wrote:
>In article <MPG.1276bc85db15c36a98a0c5@nntp.hpl.hp.com>,
>  Larry Rosler <lr@hpl.hp.com> wrote:
>> In article <7uige5$pgg$1@nnrp1.deja.com> on Tue, 19 Oct 1999 19:23:01
>> GMT, jspangen@my-deja.com <jspangen@my-deja.com> says...
>>
>> >   $word =~ s/^.*:$/; # ;-)
>>
>> What did you intend by that non-compilable line of code?  Is that why
>> there is a smiley?
>
>Upps sorry, looks like I typed a little bit to fast. But it should
>compile anyway.

Uh, really?  Did you try it?  I'm just wondering, since it *doesn't*
compile.  In a pretty obvious way, too.

*shrug*  To each their own...

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Your point being..." - Homer Simpson


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

Date: Fri, 22 Oct 1999 22:08:05 -0400
From: Dan Krause <DCK@oldmanhonda.com>
Subject: Newbie: graphic counter:shes-a no work!
Message-Id: <38111883.F7F0A07D@oldmanhonda.com>

I am new to writing CGI scripts in PERL and have hit a wall. I can fully
read in form data, analyze it, file it, send e-mail and respond with a
new HTML. But my new effort in getting a graphic counter to work is a
no-show. I have copied several examples but none seem to work, just a
broken gif picture.

Anybody have a good perl script that works and the needed HTML SRC line
needed to call it?

Dan Krause



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

Date: Sat, 23 Oct 1999 02:27:50 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: passing an array as a hash value?
Message-Id: <Pine.HPP.3.95a.991023022422.23725A-100000@hpplus01.cern.ch>

On 22 Oct 1999, Ran Shoham wrote:

> another question for a newbie

So you haven't been paying attention before sticking your hed above
the parapet...

>  (where are the FAQ's for Perl anyways?)

If you have Perl, they are right there on your system.

If you haven't, wouldn't it be a good idea to get it first?

> (send comments to rshoham@acs.ucalgary.ca)

What?  This is usenet, in case you don't know.

news.announce.newusers has important information for you, if you want to
join the community.  



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

Date: Fri, 22 Oct 1999 22:19:08 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: passing an array as a hash value?
Message-Id: <38111B1C.6AF302D4@rochester.rr.com>

Ran Shoham wrote:
 ...
> if I have an item, value pair to be hashed.
> and the value is actually an array of several values.
> 
> how is this added to the hash table?
> 
> that is,
> 
> would I do something like
>    $hash{$word} = @array;
> 
> Ran
> (send comments to rshoham@acs.ucalgary.ca)
 ...
On your computer, give the command:

perldoc perlref

at your operating system's command prompt.  If Perl has been
installed correctly, this will give you Perl's perlref documentation.
It has everything you need to know about storing arrays in
hashes, etc etc.

If you need to learn more about what FAQ's and documentation is
available, give:

     perldoc perl

BTW:

     $hash{$word}=\@array;

will do the trick.  Now you'll probably want to know how to
get the contents of an array element back out, right?

     $element2=$hash{$word}->[1];

or

     $element2=$hash{$word}[1];

and how to get the entire array out:

     $arrayout=@{$hash{$word}};

-- 
Bob Walton


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

Date: Sat, 23 Oct 1999 04:09:49 GMT
From: nate237@my-deja.com
Subject: Re: Perl and shadow passwords
Message-Id: <7urcec$13e$1@nnrp1.deja.com>

I've experimented with Digest::MD5 but I'm not getting what I expect.

For example, this is some code I'm playing with:

-------------------------------
#!/usr/local/bin/perl -w

use Digest::MD5  qw(md5 md5_hex md5_base64);

print crypt("password","pa");
print "\n";
print md5_base64("password");
print "\n";
-------------------------------

Neither of the outputs match the entry in the shadow file, and the
entries in the shadow files for Solaris and Linux differ quite a bit.
Either I'm using MD5 correctly for this application, or I'm not using
the same crypt method as the OS's.  Any ideas?  What's the best way to
determine what crypt method the OS's are using?

Thanks,
Nathan Nichols
nate237@deja.com



In article <Pine.GSO.4.10.9910221200180.29843-
100000@user2.teleport.com>,
  Tom Phoenix <rootbeer@redcat.com> wrote:
> On Thu, 21 Oct 1999 nate237@my-deja.com wrote:
>
> > I am attempting to create a process to add new users to Solaris and
> > Linux boxes via Perl.  I couldn't find a module that would do this
> > (with shadow passwords), so I've started on writing something
myself.
>
> Hmmmm. There should be something. But okay...
>
> > Does anyone have an example of what module and/or syntax to use to
> > encrypt a password with MD5 into a format suitable for the shadow
> > file?
>
> You do know about the MD5 module, right? But if you need to know how
> Linux's shadow file works, check the manpages and Linux newsgroups.
Good
> luck with it!
>
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/
>
>


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


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

Date: Sat, 23 Oct 1999 12:38:26 +0800
From: Fred Chan <fred@cocohost.com>
Subject: perl on windows ?
Message-Id: <38113BC2.54DD51C4@cocohost.com>

How can I install module into perl ?
I can not make from windows ?

perl makefile.pl <-----OK
make  <------ file is not find ...
make test < ---- file is not find

Thanks



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

Date: Fri, 22 Oct 1999 23:05:48 -0400
From: "Billy Zhao" <bz9t@yahoo.com>
Subject: Perl vs. REBOL
Message-Id: <7ur8mv$83v$1@murdoch.acc.Virginia.EDU>

Hi,

I'm working on a project for my programming languages class.  Given as how
REBOL is still relatively new and there're not too many testimonials out
there, I was just wondering if someone who has used REBOL and/or Perl can
run down a list of specs I have and tell me which language has the advantage
over the other?

The project is to evaluate the suitability of Perl and REBOL for use in
"constructin an infrastructure for sharing information among a set of
company databases."   This infrastructure should communicate with the
databases though their APIs.  Although, I imagine that the fact that it is
to be used in a database is pretty much irrevelant, we're just trying to
contrast the two languages.

The following is a list of specifications my group came up with:

1.  external interface (how well can the end-user utilize the program, how
clean and intuitive is the compiler interface)

2.  portability (Perl and REBOL both support system independent code, and
REBOL doesn't support system dependent code.  But to what degree does Perl
support the latter?)

3.  supporting datatypes (do the languages provide data types that allow for
programming the associated database programs)

4.  speed (how fast are corresponding processes performed?  Larry Wall says
that REBOL runs about 10 times slower than Perl, but has REBOL made any
improvements since?)

5.  extensibility (how easy is it to extend the database program beyond the
stage it is at today, does each language provide libraries?)

6.  security (how safe is the lanugage in terms of doing things over an open
network?  file security?)

7.  readability (REBOL was made to be written and read easily, but does it
work in practice?)

8.  fault tolerance (how is the built in error catching and exception
handling mechanisms?)

9.  flexibility (how easy is it to do really different things with the
language (i.e. be suitable for a database AND a game))



Thanks in advance for any help!

Billy Zhao






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

Date: Sat, 23 Oct 1999 01:18:58 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Reference challenge
Message-Id: <38110D10.CBEFA761@home.com>

[posted & mailed]

Tramm Hudson wrote:
> 
> Your code also works on several of the test cases that I designed, although
> it does fail on this one:
> 
> {
>         package Foo;
>         use base 'Tie::Scalar';
>         sub TIESCALAR { bless {} }
>         sub FETCH { "Baz" }
> }
> 
> my $foo;
> tie $foo, 'Foo';

Cute.  I thought someone would do something funny with C<tie> but I
didn't think it through.  This would be pretty easy to catch with
C<tied>, though.

This is a good example of why we shouldn't really want an under_ref
operator.  If you want to use an object as a scalar (or whatever) then
you shouldn't care what's under the hood.

> Your code reports that $foo is a "Here be  reference".  Not quite
> what I would expect.  It does properly handle ones that try to trick it
> like this:
> 
> {
>         package Bar;
>         use overload '""' => sub { 'ARRAY' };
> }
> 
> my $bar = bless {}, 'Bar';
> 
> since the eval statement doesn't call the stringification
> operator.  Sneaky!

More like lucky!  I didn't think of overloading at all.

> Good job,

Thanks, but it seems like it has quite a few shortcomings.

In particular, I don't see any way around

    bless [], "0";

which appears to be the point of Sean's restrictions.  I can get around
it with a relaxed condition 3 (allowing me to call eval "&\$ref") by
removing the C<ref> test at the beginning of the sub but that's no fun.

Ah, well, at least we got to see TMTOWTADI (A=almost).

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Fri, 22 Oct 1999 22:29:48 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Regular Expression problem
Message-Id: <38111D9C.7878BBE6@rochester.rr.com>

Justin Perkins wrote:
> 
> I'm parsing html file searching for <img src="foo BAR.gif"> links so I
> can change foo BAR.gif to foo bar.gif.  My problem is when there is more
> 
> than one per line.
> Here is my regex:
> 
> /((<img src\s*=\s*")([-a-zA-Z0-9.\/: ~]*)("[a-zA-Z0-9= ]*>))+/iog;
> 
> Here is one of the lines it hangs up on:
> 
> <center><img SRC="girl whorse.GIF" height=135 width=179><img SRC="soil
> profile2.JPG" HSPACE=15 BORDER=0 height=130 width=189
> align=ABSCENTER></center>
> 
> That's all one line.  The thing it matches on apparently is this:
> 
> <img SRC="girl whorse.GIF" height=135 width=179><img SRC="soil
> profile2.JPG" HSPACE=15 BORDER=0 height=130 width=189 align=ABSCENTER>
> 
> when I want it to match them individually
> 
> Any suggestions?

Yes.  Use module HTML::Parser to parse your HTML.  HTML parsing is
tougher than it looks at first glance, and HTML::Parser does a lot
of hard things correctly.  You have barely even started with the
problem you identified.  Consider the possibility of HTML commentary
in the middle of your stuff, for example.  And maybe that 
commentary contains some tags your are looking for...

> 
> Justin Perkins
-- 
Bob Walton


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

Date: Fri, 22 Oct 1999 20:15:01 -0700
From: "rootdog" <corlando@MUNGEpop.phnx.uswest.net>
Subject: robust telnet solution?
Message-Id: <6K9Q3.879$Rs2.54797@news.uswest.net>

Is there a module and or method which ensures proper echoing of characters
when writing an interactive client/server app in perl or any other language?
In TPJ 15  Lincoln Stein demonstrates client/server in perl using
Chatbot::Eliza,  inetd etc. Unfortunately, many of the emulators we use did
not handle echoing very well with the example. I rolled my own using
hard-coded carriage returns and that worked better but it still failed to
echo properly on a substantial number of potential clients. This is
obviously not only a problem  with  perl as our HP Jet-Direct  cl interface
does not behave well with Windows or various emulators either.

So what I'm wondering is does anybody have any pointers about writing a
robust client/server app in perl that will handle the majority of clients
thrown at it?


flushing and
frustrated..........................................................




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

Date: Fri, 22 Oct 1999 21:25:32 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: seeking past 4GB
Message-Id: <38110E19.2ACCAA94@chaos.wustl.edu>

Tom Phoenix wrote:
> When you configure perl (before it is installed) one option is to allow
> files larger than 4GB, if your system supports that. Is that what you're
> looking for? Cheers!

This is new Tom and isn't part of the 5.005_03 dist ( I checked ) yet.
Also, it is set for files larger than 2GB. I imagine there are problems
with the code that need to be taken care of first. :)

e.


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

Date: Fri, 22 Oct 1999 17:34:11 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: string question
Message-Id: <mbudash-2210991734110001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <MA6Q3.9494$7G2.53968@news1.online.no>, "Michael Namm"
<aerial@online.no> wrote:

>Simple question, how do I reduce the letters in a given string (for shorting
>down filenames for description) from right to left?
>longestfilenameiveeverseenthisyear.zip --> longest
>
>On forehand, thanks.
>
>M.N. (mnamm@usa.net)

use perl's substr function (or did i miss something here?)

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


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

Date: Fri, 22 Oct 1999 21:54:05 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: string question
Message-Id: <3811153D.F6E07869@rochester.rr.com>

Michael Budash wrote:
> 
> In article <MA6Q3.9494$7G2.53968@news1.online.no>, "Michael Namm"
> <aerial@online.no> wrote:
> 
> >Simple question, how do I reduce the letters in a given string (for shorting
> >down filenames for description) from right to left?
> >longestfilenameiveeverseenthisyear.zip --> longest
 ...
> use perl's substr function (or did i miss something here?)

Well, there is the possibility the truncated filename already
exists (assuming that the filename is to be changed).
If so, something like [untested]:

$truncated_file_name=substr($filename,0,7);
while(-e $truncated_file_name){$truncated_file_name.='+'}

should get a unique name, assuming no other process or thread is
attempting the same thing.
 ...
> Michael Budash ~~~~~~~~~~ mbudash@sonic.net
-- 
Bob Walton


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

Date: Fri, 22 Oct 1999 17:10:38 -0700
From: Shuba Swaminathan <sswaminathan@micron.com>
To: Michael Namm <aerial@online.no>
Subject: Re: string question
Message-Id: <3810FCFD.645F2F7D@micron.com>

If you want a fixed number of letters always, "substr" will do it for you.

Michael Namm wrote:

> Simple question, how do I reduce the letters in a given string (for shorting
> down filenames for description) from right to left?
> longestfilenameiveeverseenthisyear.zip --> longest
>
> On forehand, thanks.
>
> M.N. (mnamm@usa.net)



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

Date: Fri, 22 Oct 1999 21:03:56 -0400
From: "CS" <@mdo.net>
Subject: Re: tough regex problem
Message-Id: <gN7Q3.29622$E_1.1626629@typ11.nn.bcandid.com>

>    s/(?<!')ab(?!')/blah/g
>
Thanks a bunch, Larry.  This did the trick.

Regards, Chris S.




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

Date: Fri, 22 Oct 1999 17:12:14 -0700
From: Shuba Swaminathan <sswaminathan@micron.com>
To: Brad Wallace <brad_a_wallace@hotmail.com>
Subject: Re: WIN .EXE files from PERL
Message-Id: <3810FD5E.B765891C@micron.com>

www.perl2exe.com. Their products work and you recieve prompt and accurate
troubleshooting responses.

Brad Wallace wrote:

> Hello,
>
> How do I take a PERL script and turn it in to a .exe file for windows?
>
> Brad



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

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


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