[9992] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3585 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 30 01:03:58 1998

Date: Sat, 29 Aug 98 22:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 29 Aug 1998     Volume: 8 Number: 3585

Today's topics:
    Re: Argh! NT Perl willhackperl@my-dejanews.com
        AS400 PROGRAMMERS W/JD EDWARDS NEEDED FOR MIGRATION PRO yashford@bellsouth.net
    Re: Can you reload frames <rootbeer@teleport.com>
    Re: directories (Jonathan Stowe)
        Help with a fork() and pipe() problem (Malcolm Hoar)
    Re: Help with date script' (Mike Wescott)
    Re: How do I compare the contents of two files... <andyw@interserv.com>
    Re: How to extract first letter in string? (Craig Berry)
    Re: Imagine... a non-greedy world! <arunas@a!nm.org>
    Re: Imagine... a non-greedy world! (Ronald J Kimball)
        Installation Problem on redhat linux rknig@my-dejanews.com
    Re: Installation Problem on redhat linux (Lloyd Zusman)
    Re: Java Web Server File Uploads <rootbeer@teleport.com>
    Re: Max value in an array (Jonathan Stowe)
        not able to output to browser <dan@bns.com>
    Re: not able to output to browser <rootbeer@teleport.com>
        parsing "mulitpart form-data" with cgi-lib.pl on JWS simple@nanospace.com
    Re: Perl Contract Engineer (Jonathan Stowe)
    Re: Perl documentation (Bob Trieger)
    Re: Perl Script to Retreve HTML Files from the Internet <rootbeer@teleport.com>
    Re: Q: remain order, hash (Neil Kandalgaonkar)
    Re: regex help, again?? (Bob Trieger)
    Re: Remove lines from output (Craig Berry)
    Re: Sending mail with Perl 5 <rootbeer@teleport.com>
    Re: sorting <rootbeer@teleport.com>
    Re: Uploading Binary files (Jonathan Stowe)
        Using <!--something--> <vytis@gmx.net>
    Re: what's wrong with this statement? More explanation. (Nathan V. Patwardhan)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Sat, 29 Aug 1998 20:06:54 GMT
From: willhackperl@my-dejanews.com
Subject: Re: Argh! NT Perl
Message-Id: <6s9n0v$87f$1@nnrp1.dejanews.com>

In article <35E5C44A.22C5F502@gusun.georgetown.edu>,
  Dave Stephens <stepherd@gusun.georgetown.edu> wrote:
> For Win32 platforms you must associate the .pl file extension with Perl.exe in
> the Windows file types menu.  ActiveState perl w/ IIS does all this
> automatically, but then you have to deal with all the things that ActiveState
> doesn't support.
>
> (From windows explorer VIEW-->Options-->File Types).  Add new file type,
actions
> = open.  Define open as the path to Perl.exe
> with "%1" after it.  Example c:\perl\bin\perl.exe "%1".
>

Be careful about doing this without being aware of the implications,
especially with IIS.  See

http://rootshell.com/archive-j457nxiqi3gq59dv/199807/perliis.txt.html

for details.

Bill

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Sat, 29 Aug 1998 16:36:29 GMT
From: yashford@bellsouth.net
Subject: AS400 PROGRAMMERS W/JD EDWARDS NEEDED FOR MIGRATION PROJECT
Message-Id: <6s9amd$ou9$1@nnrp1.dejanews.com>

                     ATTENTION CONSULTANTS/CONSULTING FIRMS
               30 AS400 PROGRAMMERS W/JD EDWARDS NEEDED!!!!!!!!!


Here's the deal :

Client:         Fortune 500
Location:       IL
Term:           until 2000
Compensation: DOE
We are looking for candidates in the OPEN range but skill sets are more
important.

Platform: AS/400

Packages: jd edwards Sales order module preferred. JDEdwards software
package experience is a MUST!

Project: mainframe conversion to as/400 jd ed Environment

Process is phone interview (2) possibly (RARE: 1 face to face) depends
on skills and experience.  Client will pay airfare lodging per diem etc. all
reasonable request will be considered

If you have any Consultants available, please reply to this email message with
resumes , rate and contact information for immediate consideration.  Client is
accepting H1 Visa Consultants.

As Consultants are chosen our Senior Recruiter will be calling to set up first
interview.

Please send your resume to yashford@bellsouth.net along with desired rate for
immediate consideration.


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Sat, 29 Aug 1998 15:32:58 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Can you reload frames
Message-Id: <Pine.GSO.4.02A.9808290832120.15614-100000@user2.teleport.com>

On 29 Aug 1998, Mark FINOCCHIARO wrote:

> Using forms is is possible to send data to more than one perl script?

Yes.

If you're trying to get a browser or server to do what you want, the docs,
FAQs, and newsgroups about browsers, servers, and related issues should be
useful. Hope this helps!

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



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

Date: Sat, 29 Aug 1998 21:56:11 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: directories
Message-Id: <35e86266.37255682@news.btinternet.com>

On Fri, 28 Aug 1998 17:16:40 -0400, Matt wrote :

>Hi,
>
>I seem to be having a directory problem with my bulletin board script.
>When I issue the command
>
>chdir($certaindir);
>
>It doesn't change the directory or doesn't do it fast enough because its
>writing all the files to the directory the perl script is in.
>
>Any suggestions?
>

Your CGI might have a different view of which directory is current
than that which you expect.  Certain servers chroot() or simply alter
the working directory when executing CGI scripts for security purposes
or whatever.  Others have advocated checking the return of chdir which
is absolutely right but you may also use the Cwd module to find if the
directory you are actually in is the one that you expected.  you could
also do a -d test on the directory before you chdir into it to check
that it is actually there.

/J\
-- 
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 29 Aug 1998 17:37:19 GMT
From: malch@malch.com (Malcolm Hoar)
Subject: Help with a fork() and pipe() problem
Message-Id: <6s9e8e$h4e$2@nntp1.ba.best.com>

I have a Perl application where a parent fork()'s multiple
children and then communicates with them via a pair of
pipe()'s.

At random times (but, it's definitely more frequent under
high system load) the data returned from the children via
the pipe gets garbled. Shortly thereafter, everything
locks up. ps -l shows all the children hanging on WCHAN=pipwdc.
The parent on WCHAN=pipewr.

It's not a classic 'deadlock' and the pipe is not broken
(as in SIG PIPE). The children do not die and they are not
zombied/defunct. I have verified that good data is being 
sent to the children. But, garbage is returned for a while
before everything hangs.

I really have worked at following every tip and recommendation
I could find in the Camel and perlipc regarding fork(),
pipe(), signals et al.

Does anyone have any idea what this might be or, more
likely, any suggested strategies for tracking it down?
If this is some kind of kernel race condition (currently
my best guess) is it likely that a socketpair would be
more robust?

Environment:

FreeBSD 2.2.7-RELEASE
This is perl, version 5.005_01 built for i386-freebsd

Also seen on 5.004_04.

TIA

-- 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar           "The more I practice, the luckier I get". |
| malch@malch.com                                     Gary Player. |
| http://www.malch.com/               Shpx gur PQN.                |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: 29 Aug 1998 11:35:12 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: Help with date script'
Message-Id: <x4emtz94y7.fsf@cygnus.ColumbiaSC.NCR.COM>

In article <Pine.GSO.4.02A.9808281831300.14973-100000@user2.teleport.com>
Tom Phoenix writes:
> On 28 Aug 1998, Shane Stout wrote:
>> I have to write a script that determines the date and then calculates
>> the next days date in the form Month dayofmonth, year.  I am using the
>> conversion function localtime, but if I do I have to also script a
>> solution to trap the ends of each month.

> No, you simply have to pass localtime the proper parameter. Hope this
> helps!

Of course that's not quite as easy as it seems.

Now + 24hrs isn't always tommorrow. But if now + 13hrs isn't
tommorrow then now + 26hrs is. Or by temporarily diddling the
$ENV{TZ} one can guarantee that now + 24hrs is tommorrow (at
least as far as localtime() is concerned).

-- 
	-Mike Wescott
	 mike.wescott@ColumbiaSC.NCR.COM


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

Date: Sat, 29 Aug 1998 13:13:31 -0500
From: Andrew Whitcroft <andyw@interserv.com>
Subject: Re: How do I compare the contents of two files...
Message-Id: <6s9g4c$i0u@newsops.execpc.com>

Hi ---

Jonathan is correct, I probably did not provide enough information. So,
here is goes:

As I said I save the results to a file with colons between each of the 7
fields. Then,
I sort the results using the system command, sorted numerically by percent
full. I
then open the file and print formatted results.

As I said I want to take this on step further, by comparing either the
sorted or unsorted,
colon seperated fields against the last time using the parameters stated
previousily.

So the questions are as follows:

1) How do I load, the two files so I can do #2.
2) Compare the before file & after file using the percentage value where
the
key is machine name, filesystem name and print results using the print
parameters
given previously ?
3) Does the before file need to change everytime the comparasion is run,
or can I
use the same one serverl times before updating it??

Thanks in advance,
Andy.



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

Date: 29 Aug 1998 19:37:09 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: How to extract first letter in string?
Message-Id: <6s9l95$lo3$4@marina.cinenet.net>

Daniel Stridhammar (daniel@NOSPAMstridhammar.pp.se) wrote:
: > Are there anyone, who can tell me how to extract the first letter in a
: > string..
: 
: Use:
: 
: $firstLetter = substr($string, 1, 1);

And scratch your head in puzzlement as to why $firstLetter contains the
second letter in the string. :)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Sat, 29 Aug 1998 12:44:15 -0600
From: "Arunas Salkauskas" <arunas@a!nm.org>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <35e84bcc.0@news.cadvision.com>


Mee wrote in message <35E7B28D.2207FF28@mine.com>...
>To: All priests of Perl black maguc
>
>My favorite beef with Perl (besides it being the ugliest
>language man has ever devised) is its implementation of
>Regular Expresssions (regexp).


You don't have to use Perl if you don't want to.  Go and try to write useful
programs with other shell tools, and then realize why Larry Wall invented
Perl.  It is popular for a reason.

--
- Arunas Salkauskas
High Point Designs
http://www.highpointdesigns.com/





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

Date: Sat, 29 Aug 1998 11:56:21 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Imagine... a non-greedy world!
Message-Id: <1deitbs.16whjtz1erar40N@bay1-283.quincy.ziplink.net>

Mee <mee@mine.com> wrote:

> My favorite beef with Perl (besides it being the ugliest 
> language man has ever devised)

Well, you're already off to a bad start.  If you're looking for sympathy
in clpm, this may not be the best way to begin your post.

> is its implementation of Regular Expresssions (regexp).

Apparently you have very little experience with regular expressions.
*All* implementations of regexes have greedy quantifiers.  If you have a
problem with greediness in regular expressions, it is a problem with
regular expressions in general, not with Perl.

> Day after day, I find myself fighting the regexp greediness
> tooth and nail to arrive at the desired result.

I would highly recommend the book Mastering Regular Expressions, by
Jeffrey Friedl, from O'Reilly & Associates.

> Why in the world should /si*k/ match "something that bozos
> put on their ugly, bloated faces when they get drunk" 
> rather than just simply "sink" is beyond me.

*snicker*
I know of no regular expression implementation in which /si*k/ will
match either "something that bozos put on their ugly, bloated faces when
they get drunk" or "sink".

> Now, can anyone imagine a world with Perl in harmony 
> with nature? Would it take away the magic, would it make 
> it too plain?

Perl is in harmony with every other implementation of repetition
quantifiers in regular expressions.  Your use of the word 'nature' is
rhetorical and irrelevant.

> Or am I simply overlooking some hidden, but obvious too
> the enlightened, logical reason for greediness?

No, you are overlooking a glaringly obvious logical reason for
greediness.
'aaaaaaaa' =~ /a*/;
Should that match '', or the entire string?


Wouldn't it be nice if Perl had a way to specify non-greedy quantifiers?
If you had read perlre, you would know that it does.

How foolish of you to condemn Perl for lacking the feature that it
uniquely has.

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sat, 29 Aug 1998 23:03:50 GMT
From: rknig@my-dejanews.com
Subject: Installation Problem on redhat linux
Message-Id: <6sa1cm$k6r$1@nnrp1.dejanews.com>

I am trying to compile perl version 5.004_04.  The configure script runs fine
but when I type make I get the following error:

[perl5.004_04]$ make
makefile:441: *** missing separator.  Stop.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 30 Aug 1998 03:14:46 GMT
From: ljz@asfast.com (Lloyd Zusman)
Subject: Re: Installation Problem on redhat linux
Message-Id: <slrn6uhh02.l0.ljz@sunspot.tiac.net>

On Sat, 29 Aug 1998 23:03:50 GMT, rknig@my-dejanews.com <rknig@my-dejanews.com>
wrote:
> I am trying to compile perl version 5.004_04.  The configure script runs fine
> but when I type make I get the following error:
> 
> [perl5.004_04]$ make
> makefile:441: *** missing separator.  Stop.

Some versions of `make' require that production lines be indented with
one or more tabs and not a series of spaces.  Other versions of `make'
do not care about this.  Also, I vaguely recall coming across cases
where `make' doesn't like empty lines that actually contain one or
more spaces or tabs.

Perhaps you have one of these versions of `make' in your PATH.  What
version of `make' are you using?  I'm using "GNU Make version 3.76.1"
under my version of Linux, and all my Perl makes have worked just
fine.

What do you see when you type `make -v'?

-- 
 Lloyd Zusman
 ljz@asfast.com
 God bless you.


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

Date: Sat, 29 Aug 1998 15:34:35 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Java Web Server File Uploads
Message-Id: <Pine.GSO.4.02A.9808290833500.15614-100000@user2.teleport.com>

On Sat, 29 Aug 1998 simple@nanospace.com wrote:

> Newsgroups: comp.lang.perl.misc

> Does anywone out there have experience in uploading a file to a Java
> Web Server?

Maybe someone in a newsgroup about servers has.

If you're following the proper protocol but some browser or server doesn't
cooperate, then it's the other program's fault. If you're not following
the protocol, then it's your fault. If you aren't sure about the protocol,
you should read the protocol specification. If you've read it and you're
still not sure, you should ask in a newsgroup about the protocol.

Hope this helps!

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



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

Date: Sat, 29 Aug 1998 15:18:18 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Max value in an array
Message-Id: <35e7f1b1.10405101@news.btinternet.com>

On Fri, 28 Aug 1998 12:02:03 -0400, John Porter wrote :

>Haijo wrote:
>> 
>> Randal Schwartz (merlyn@stonehenge.com) wrote:
>> ++ Yup.  map in a void context.  Pure Evil.
>> 
>> So are penguins.
>
>What? Penguins are evil?  Are you a Linux hater?

As a complete aside and nothing whatsoever to do with Perl when we
moved to our current abode a few years ago we discovered that the
plant beds in the back yard were full of inch high plastic penguins
*exactly* like the Linux Logo. No plastic camels though.

/J\
-- 
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 29 Aug 1998 08:34:44 -0700
From: "Dan Bassett" <dan@bns.com>
Subject: not able to output to browser
Message-Id: <35e8202c.0@news1.starnetinc.com>

Can anyone tell me why the following simple code will not output to the
browser,
but if you run it through the shell, the output is displayed?  Am I missing
something?  I'm trying to output the quota command results to the web
browser.

Any help would be appreciated...

Script:

#!/usr/bin/perl5

print ("Content-Type:text/html\n\n");


open (RESULTS, "quota |");
@results = <RESULTS>;
    foreach (@results) {

       print $_;
    }

close(RESULTS);




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

Date: Sat, 29 Aug 1998 16:11:56 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: not able to output to browser
Message-Id: <Pine.GSO.4.02A.9808290911060.15614-100000@user2.teleport.com>

On Sat, 29 Aug 1998, Dan Bassett wrote:

> Can anyone tell me why the following simple code will not output to
> the browser, but if you run it through the shell, the output is
> displayed?

When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.

   http://www.perl.com/CPAN/
   http://www.perl.org/CPAN/
   http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
   http://www.perl.org/CPAN/doc/manual/html/pod/

Hope this helps!

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



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

Date: Sat, 29 Aug 1998 14:07:33 +0100
From: simple@nanospace.com
Subject: parsing "mulitpart form-data" with cgi-lib.pl on JWS
Message-Id: <simple-2908981407330001@tc1-dialin17.nanospace.com>

I've posted this before, but let me rephrase it.

I need to use the cgi-lib.pl to parse a file upload via http. That is I've
created a form on a web page that uploads a file from your hard drive.  In
the form you have to specify an enctype of multipart/form-data.  

This same Perl script which requires cgi-lib.pl v2.17 correctly parses an
uploaded file through IIS on windows NT and through Apache on Linux and
Solaris.  It fails on Java Web Server on Windows NT.

I can simply do away with cgi-lib.pl and redirect STDIN to write to file,
but there are other elements that need to be parsed out. I'm trying to
avoid rewriting that part of cgi-lib.pl that deals with parsing
mulitpart/form-data. At least until I've made a reasonable check of the
news groups.


Does anyone have experience using web forms to do file uploads to a Java
Web Server and successfully using the cgi-lib.pl to parse the data?


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

Date: Sat, 29 Aug 1998 21:56:03 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Perl Contract Engineer
Message-Id: <35e84c0b.32294746@news.btinternet.com>

On Sat, 29 Aug 1998 00:49:09 -0400, Ronald J Kimball wrote :

><@san.rr.com> wrote:
>
>> We are looking for a contract engineer with experience in Perl 5.1
>> programming for a project we have.
>
>I think you may be looking for quite some time...
>
>5.1??
>

He obviously omitted the fact that they are working in time travel
software.  One way round the century problem is just to program into
the future beyond the millenium.

/J\
-- 
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 29 Aug 1998 15:53:47 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Perl documentation
Message-Id: <6s98cj$6t$2@ligarius.ultra.net>

[ posted to usenet and courtesy e-mail sent to lvirden@cas.org]

lvirden@cas.org wrote:
-> 
-> I am averaging 3-4 spams a day and I post quite a bit.  I don't delete
-> my spam identified mail automatically - my spam filters on sites tend to
-> pick up legit email and mailing list traffic along with the garbage.
-> I need to clean out that list and start over I guess...

Filter out any mail with relay*UU.NET, ybecker or bellglobal in the 
headers and you can cut that down to 3 or 4 a week.


Bob Trieger
sowmaster@juicepigs.com


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

Date: Sat, 29 Aug 1998 18:35:53 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl Script to Retreve HTML Files from the Internet
Message-Id: <Pine.GSO.4.02A.9808291135170.15614-100000@user2.teleport.com>

On Sat, 29 Aug 1998, Brian Zuill wrote:

> How do I compose a perl script file to get an HTML File from the Internet?

The FAQ has a solution in section nine. Hope this helps!

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



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

Date: 29 Aug 1998 11:43:17 -0400
From: yuiop@smelt.openface.ca (Neil Kandalgaonkar)
Subject: Re: Q: remain order, hash
Message-Id: <6s97il$969@smelt.openface.ca>

In article <6s8ho7$uq6$1@nnrp1.dejanews.com>,  <dwiesel@my-dejanews.com> wrote:

>I wonder how I can remain the order of the persons in the file when I put them
>in a hash. 

Truly the most FA of all FAQs. See perlfaq4, or 
<http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfaq4.html>.

-- 
Neil Kandalgaonkar            yuiop communications
neil@yuiop.com


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

Date: Sat, 29 Aug 1998 19:40:33 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: regex help, again??
Message-Id: <6s9llq$t44$1@ligarius.ultra.net>

[ posted to usenet and courtesy e-mail sent to <skidmore@musc.edu> ]

"josh skidmore" <skidmore@musc.edu> wrote:
-> ok...i am tring to post the business news from wired on my site...i am using
-> LWP (simple) to do it, but how exactly do I get a regex to get the line
-> labeled **LINE**??  There is nothing similar?
-> 
->     <font face="Arial, Helvetica, sans-serif" size=3>
->     <a href="/news/news/business/story/14705.html"><b>Intuit: Cost-Cutting
-> Pays Off</b></a></font>
->     <br>
->     <font color=#ff0000 face="Verdana, Arial, Geneva, sans-serif"
-> size=1><b></b><!br>Thursday</font>
->     <font face="Verdana, Arial, Geneva, sans-serif" size=2>
->     **LINE** The maker of personal finance software says its close eye on
-> expenses helps account for its better-than-forecast fourth-quarter earnings.
->     </font>

untested:

s!.*\*\*LINE\*\*(.*?)</font>.*!$1!ism;

or

$foo = '**LINE**';

s!.*\Q$foo\E(.*?)</font>.*!$1!ism;

HTH

Bob Trieger
sowmaster@juicepigs.com


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

Date: 29 Aug 1998 19:31:04 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Remove lines from output
Message-Id: <6s9kto$lo3$2@marina.cinenet.net>

simple@nanospace.com wrote:
: Try matching instead of equality:
: 
: if ($port !~ /ttyE60|ttyE61/)  {

Or, for a gain in efficiency and (IMO) readability, use

  /ttyE6[01]/

instead.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Sat, 29 Aug 1998 15:41:49 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Sending mail with Perl 5
Message-Id: <Pine.GSO.4.02A.9808290838360.15614-100000@user2.teleport.com>

On Sat, 29 Aug 1998 betat@my-dejanews.com wrote:

> Subject: Sending mail with Perl 5

The FAQ talks about this in section nine. (But why do you specify the
numeral in "Perl 5"? You didn't say "in the summertime" or "using a
computer" or "to an email address". :-)

> The script seems to be OK and when I trace the exchanges with the
> mail server everything looks OK as well.

If you're following the proper protocol but some mail server doesn't
cooperate, then it's the other program's fault. If you're not following
the protocol, then it's your fault. If you aren't sure about the protocol,
you should read the protocol specification. If you've read it and you're
still not sure, you should ask in a newsgroup about the protocol.

Hope this helps!

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




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

Date: Sat, 29 Aug 1998 17:53:45 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: sorting
Message-Id: <Pine.GSO.4.02A.9808291051420.15614-100000@user2.teleport.com>

On Sat, 29 Aug 1998, Alan Melton wrote:

> Subject: sorting

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

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

> Would like to sort report on $desc and get subtotals after a break on
> each sort.

As I said to you when you asked about this last Monday:

What's stopping you? :-)

There's good documentation on sort, including multi-level sorts, in the
manpages. Hope this helps!

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



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

Date: Sat, 29 Aug 1998 21:56:10 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Uploading Binary files
Message-Id: <35e861c3.37092060@news.btinternet.com>

On Fri, 28 Aug 1998 16:22:40 -0700, Jerome O'Neil wrote :

>Jeff Handley wrote:
>> 
>> I am trying to write a CGI script in Perl which handles a file upload
>> from a form.  I can read in and save text files without a problem, but
>> when I read in binary files, they become corrupt.  Has anyone done this
>> successfully?
>
>Yep.  I have an image library that my users use to upload graphics.  The
>magic trick is not to use the CGI.pm upload features, but use
>CGI_Lite.pm.  Much cleaner.

And almost certainly binmode the file handle if you are running on
Win32. For more see perlfunc.

/J\
-- 
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Sat, 29 Aug 1998 14:42:21 +0300
From: "VYTiS" <vytis@gmx.net>
Subject: Using <!--something-->
Message-Id: <fVjfbr009GA.227@b4news2.lginternet.net>

Hello!!!
I'm working on a guestbook script. And I have one problem:
I need the latest posts appear at the top of the page, not at the bottom. So
I need your help now!
Here is the example of what I want:
source of file guestbook.html has 100 lines. Line 15 is:
<!--something-->
The perl script must open the html file, search for line <!--something-->
and replace it with this:
-------------begins here---------------
<!--something-->\n
<center><h1>Hello!</h1></center><br>\n
<h3>My name is Joe. I come from USA.</h3><br>\n
<hr>\n
-------------ends up here--------------
So that next time new post would appear instead of the new added
<!--something-->... I hope you understand what I mean by this? Or do you
have any other ideas on how to make latest posts appear below the header
image and text, not at the bottom of page?
                            Thanks a lot!
                                                Vytis.









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

Date: Sat, 29 Aug 1998 14:00:39 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: what's wrong with this statement? More explanation. Sorry, I know it's dull but I need help.
Message-Id: <bQTF1.11$kv1.304291@news.shore.net>

@thefree.net wrote:

: The script gets through my ISPs PerlCheck app, so I don't know what's wrong.

If your ISPs PerlCheck app was involved with the million lines of HTML
that you posted to this group a few days ago (because it did not
work), I'd strongly suggest using 'perl -c' instead.

Not a flame.  Just a suggestion.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3585
**************************************

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