[10727] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4326 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 30 17:07:20 1998

Date: Mon, 30 Nov 98 14:00:19 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 30 Nov 1998     Volume: 8 Number: 4326

Today's topics:
    Re: bugs in the perl T-shirt (was Re: Question from a m <tripp.lilley@perspex.com>
    Re: Controlling image display (Martien Verbruggen)
    Re: Cut And Paste Application on the web? <adrian@internetxs.com>
    Re: Cut And Paste Application on the web? (brian d foy)
        Excel Spreadsheets, Perl, CGI and Linux michalk@awpi.com
        field selection using "split" - question (Jonathan Cook)
    Re: field selection using "split" - question (brian d foy)
    Re: field selection using "split" - question <rootbeer@teleport.com>
    Re: field selection using "split" - question (Larry Rosler)
    Re: Folder Recurison (Larry Rosler)
        how to exec java class in a html file <xliu@ecs.umass.edu>
    Re: how to exec java class in a html file <rootbeer@teleport.com>
    Re: Input from <TEXTAREA> via perl and DBI into MySQL d <adrian@internetxs.com>
    Re: Origin of 'local'? <tchrist@mox.perl.com>
        Perl and mysql <kiml@worldnetla.net>
    Re: Perl and mysql (brian d foy)
    Re: Perl CGI program ptimmins@netserv.unmc.edu
        Perl DBI error <ringwood@berbee.com>
    Re: strange behavior with fork and file handles (Charles DeRykus)
    Re: top list (Martien Verbruggen)
    Re: Training wheels for Perl (Adam Turoff)
        What's the best way? baillie@my-dejanews.com
    Re: What's the best way? <rootbeer@teleport.com>
    Re: Y2K and Programmer Denial (Andrew M. Langmead)
    Re: Y2K and Programmer Denial <tchrist@mox.perl.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Mon, 30 Nov 1998 15:13:18 -0500
From: Tripp Lilley <tripp.lilley@perspex.com>
Subject: Re: bugs in the perl T-shirt (was Re: Question from a mega-geek)
Message-Id: <3662FC5E.7D568021@perspex.com>

Ronald J Kimball wrote:

> Ack!  If I combined the GPLed shirt with my own blue jeans to create an
> outfit, and then let someone else wear my outfit, the GPL would require
> me to let them use my blue jeans in their own outfits!

This would not be the case if he released it under the LGPL. As long as
anyone
could wear their own jeans with the T-Shirt, and if any modifications made
to the
T-Shirt did not prevent it from being worn with existing jeans, or jeans
yet to be
made (as long as, of course, those jeans still conform to the original
'jeans' interface
to which the T-Shirt was originally designed).




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

Date: Mon, 30 Nov 1998 21:13:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Controlling image display
Message-Id: <qUD82.68$5g3.100@nsw.nnrp.telstra.net>

In article <rhjxXFAIdXY2Ew2f@jacana.demon.co.uk>,
	Godfrey Jackson <gallery@jacana.demon.co.uk> writes:
> I have a perl subroutine that allows me to control the
> security and display of jpg images. Recently I found
> that it does not work with IE4. Netscape and IE3 are ok.

If it works in most browsers, but not in one, then it is certainly not
a perl problem. It may be that you incorrectly are using conventions
or protocols, or that the browser implements them incorrectly.

Either case is a case for the people in the comp.infosystems.www.*
hierarchy. Not for us.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd.       | enough features yet.
NSW, Australia                      | 


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

Date: 30 Nov 1998 19:21:34 GMT
From: adrian <adrian@internetxs.com>
Subject: Re: Cut And Paste Application on the web?
Message-Id: <3662F059.56A8D782@internetxs.com>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
You can use the input type="file" in a &lt;form> for this. On windows comps
it will then automatically give the user the ability to browse on their
computer once they click the button.
<p>Hope this helps!
<br>&nbsp;
<p>VB BV wrote:
<blockquote TYPE=CITE>HI,
<p>I need to develop an application whereby the user on a site can cut
some
<br>image from his computer (or COPY it, whatever) and paste it inside
a textbox
<br>in the page, and then send it across. Now, on my end I want that image
to be
<br>stored in a certain directory on my server, lets say <a href="http://www.xyz.com">http://www.xyz.com</a>
is
<br>my server, then each image will be stored in, say, www.xyz.com/imagepost..,
<br>and there will be rules for the what the name of the file would be,
for
<br>instance, if a user named John Travolta posts an image on 1december1998,
<br>then the image name will johntravolta19981201 or something like that.
<p>My concern is that TEXTAREA or textbox can only take text as input...I
would
<br>really really appreciate if someone could recommend a way which this
can be
<br>done. Will I have to develop an ActiveX application for this?
<p>Please email to me also.
<p>Thanks for your time, I really do appreciate it.
<p>Best regards,
<br>VB BV</blockquote>
</html>



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

Date: Mon, 30 Nov 1998 15:54:14 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Cut And Paste Application on the web?
Message-Id: <comdog-ya02408000R3011981554140001@news.panix.com>

In article <Pine.GSO.4.02A.9811301117410.19172-100000@user2.teleport.com>, Tom Phoenix <rootbeer@teleport.com> posted:

> On Tue, 1 Dec 1998, VB BV wrote:
> 
> > I need to develop an application whereby the user on a site can cut
> > some image from his computer (or COPY it, whatever) and paste it
> > inside a textbox in the page, and then send it across.
> 
> Sounds as if you want the user's browser to be able to do this. Maybe the
> docs, FAQs, and newsgroups about browsers and related issues could help
> you here. Good luck!

actually, it would be pretty cool if one could have Perl hooks into
the cut and paste functions of the OS.  imagine doing exactly what he
specified:

   * grabbing a rectangle of the screen in some format probably
   OS dependent.

   * on COPY, use Perl::Magick to transform the COPY-ed data into
   desired format
 
   * on PASTE, use another module to ASCII-fy it, perhaps uuencoded,
   then send out the data.

within BBEdit (a Mac text editor) you can do this sort of thing
with Perl Filters (and with MacPerl you could probably do a lot
more), and i recall such a thing available for Win95 that was presented 
at the first Perl Conference.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 30 Nov 1998 21:31:22 GMT
From: michalk@awpi.com
Subject: Excel Spreadsheets, Perl, CGI and Linux
Message-Id: <73v2ra$thf$1@nnrp1.dejanews.com>

I have a shared networked Excel spreadsheet that I would like to make
available to the web via CGI and Perl on a Linux machine.

I have found the ODBC drivers, but it looks like all that is only for Win
platforms.

Is there anything that will allow me to natively query the spreadsheet from
Perl?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 30 Nov 1998 21:15:55 GMT
From: j.cook@ion.ucl.ac.uk (Jonathan Cook)
Subject: field selection using "split" - question
Message-Id: <36630803.1465278@news.demon.co.uk>

Hi All,

Does anyone know a more elegant way of selecting the last field from
an arbitrary length string like this:

$str = "/dir1/dir2/filename";

@tmp_array = split(m:/:, $str); 
$last_field = $tmp_array[$#tmp_array]; # $last_field = "filename"


any advice appreciated,

cheers,

Jon




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

Date: Mon, 30 Nov 1998 16:25:53 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: field selection using "split" - question
Message-Id: <comdog-ya02408000R3011981625530001@news.panix.com>

In article <36630803.1465278@news.demon.co.uk>, j.cook@ion.ucl.ac.uk (Jonathan Cook) posted:

> Does anyone know a more elegant way of selecting the last field from
> an arbitrary length string like this:
> 
> $str = "/dir1/dir2/filename";

File::Basename

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 30 Nov 1998 21:29:55 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: field selection using "split" - question
Message-Id: <Pine.GSO.4.02A.9811301328190.959-100000@user2.teleport.com>

On Mon, 30 Nov 1998, Jonathan Cook wrote:

> Does anyone know a more elegant way of selecting the last field from
> an arbitrary length string like this:
> 
> $str = "/dir1/dir2/filename";
> 
> @tmp_array = split(m:/:, $str); 
> $last_field = $tmp_array[$#tmp_array]; # $last_field = "filename"

    use File::Basename;

Sure, you could do this unportably, but why? Hope this helps!

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



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

Date: Mon, 30 Nov 1998 13:33:54 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: field selection using "split" - question
Message-Id: <MPG.10ccaf1ce2f309698989d@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <36630803.1465278@news.demon.co.uk> on Mon, 30 Nov 1998 
21:15:55 GMT, Jonathan Cook <j.cook@ion.ucl.ac.uk> says...
> Does anyone know a more elegant way of selecting the last field from
> an arbitrary length string like this:
> 
> $str = "/dir1/dir2/filename";
> 
> @tmp_array = split(m:/:, $str); 
> $last_field = $tmp_array[$#tmp_array]; # $last_field = "filename"

  $last_field = (split(m:/:, $str))[-1]; # $last_field = "filename"

or (using a regex instead of split):

  ($last_field) = $str =~ m:([^/]+)$:;   # $last_field = "filename"

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


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

Date: Mon, 30 Nov 1998 12:16:30 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Folder Recurison
Message-Id: <MPG.10cc9cfc70c8026798989c@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <3662EAF5.6310D2A7@email.sps.mot.com> on Mon, 30 Nov 1998 
12:59:01 -0600, Tk Soh <r28629@email.sps.mot.com> says...

> Mario Luoni wrote:
 ...
> >   scan( "$path\\$file" );
 ...
> 
> for most purposes, the File::Find standard module more than adequate,
> and more portable (you code woud likedly break when moved to Windose or
> Mac).

No, the code would in fact break when moved *from* Windoze. :-)

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


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

Date: Mon, 30 Nov 1998 15:42:42 -0500
From: "Liu, Xin" <xliu@ecs.umass.edu>
Subject: how to exec java class in a html file
Message-Id: <36630342.672E@ecs.umass.edu>

Hi, guys,
I have the following Perl program:

	#!/usr/mlocal/bin/perl  
	print "Content-type:text/html","\n\n";
	print "<HTML>\n";
	print "\n";
	print "<BODY>\n";
	print "<applet code=form1.class name=form1 width=1200 	height=800>\n";  
	print "</applet>\n"; 
	print "</BODY></HTML>\n";
	exit(0);  
When I execute it in Netscape, it tells me that:
Applet can't start error:java.lang.ClassFormatError

But if I stored the created html file to the server as tt.html,
then I browse tt.html, the applet can run.
Could you tell me why it can not run directly?

Thanks!

Liu, Xin


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

Date: Mon, 30 Nov 1998 21:27:50 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: how to exec java class in a html file
Message-Id: <Pine.GSO.4.02A.9811301323160.959-100000@user2.teleport.com>

On Mon, 30 Nov 1998, Liu, Xin wrote:

> Subject: how to exec java class in a html file

Hmmm... That sounds like a problem involving Java and HTML.

> I have the following Perl program:
> 
> 	#!/usr/mlocal/bin/perl  
> 	print "Content-type:text/html","\n\n";
> 	print "<HTML>\n";
> 	print "\n";
> 	print "<BODY>\n";
> 	print "<applet code=form1.class name=form1 width=1200 	height=800>\n";  
> 	print "</applet>\n"; 
> 	print "</BODY></HTML>\n";
> 	exit(0);  

That looks like valid Perl code. If it's not doing what you want, perhaps
the #! line is incorrect, or perhaps you're printing the wrong data, or
perhaps you intended to use a different exit status. For example, maybe
you intended for the Content-type line to be different - but that's not
Perl, of course.

> When I execute it in Netscape, it tells me that:
> Applet can't start error:java.lang.ClassFormatError

That's not a Perl error message. If Netscape isn't doing what you want,
maybe the docs, FAQs and newsgroups about Netscape and related issues
could help you. Good luck!

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



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

Date: 30 Nov 1998 19:18:39 GMT
From: adrian <adrian@internetxs.com>
Subject: Re: Input from <TEXTAREA> via perl and DBI into MySQL database.
Message-Id: <3662EFA9.7CBB7A52@internetxs.com>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
umm, I rewrote the insert code and it worked - I must have really overlooked
something ;) Thanx for the interest in solving my prob.
<br>&nbsp;
<p>brian d foy wrote:
<blockquote TYPE=CITE>In article &lt;3662BFB3.188FFFA1@internetxs.com>,
adrian &lt;adrian@internetxs.com> posted:
<p>> On a webpage I have an area that people can input 'unlimited' length
text
<br>> using the &amp;lt;TEXTAREA> HTML tag. This is passed thru my perl
script into
<br>> a MySQL database using DBI and DBD:mysql. The receiving coloumn has
been
<br>> defined as TEXT.
<br>> &lt;p>Only this just doesn't work! If I "force" an entry of exactly
what is
<br>> input from the page by putting that in the INSERT statement the table
does
<br>> get updated?!
<p>what error does DBI give you?
<p>--
<br>brian d foy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;comdog@computerdog.com>
<br>CGI Meta FAQ &lt;URL:<a href="http://computerdog.com/CGI_MetaFAQ.html">http://computerdog.com/CGI_MetaFAQ.html</a>></blockquote>
</html>



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

Date: 30 Nov 1998 07:18:10 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Origin of 'local'?
Message-Id: <73tgri$g71$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.moderated, Steven Morlock <newspost@morlock.net> writes:
:The line highlighted with the '*' is a bit surprising to me.
:Where did this seemingly unusual behavior for local come from?  Was it
:considered a feature and used to solve a particular class of problem?
:Is it documented in detail somewhere?

my()    uses lexical scoping.  (aka static scoping)
local() uses dynamic scoping.

This is documented in perlsub.

I don't quite know why what you have marked as surprising should be
be so.  The `pointer' still points to the original value.  If $rs is a
reference to $s, then just because you make a new and different variable
that happens to also be named $s, doesn't mean that $rs now points to
the new $s you just made.  That would be dynamic scoping.  You can, to
some measure, achieve this through symbolic references, but I wouldn't
normally advocate such a thing.

--tom
--
    X-Windows: A mistake carried out to perfection.
        --Jamie Zawinski


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

Date: Mon, 30 Nov 1998 13:26:03 -0600
From: "Kim Long" <kiml@worldnetla.net>
Subject: Perl and mysql
Message-Id: <73urci$iq$1@jupiter.worldnet>

Can anyone give me a starting place query mysql with a perl script.

Kim




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

Date: Mon, 30 Nov 1998 16:25:24 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl and mysql
Message-Id: <comdog-ya02408000R3011981625240001@news.panix.com>

In article <73urci$iq$1@jupiter.worldnet>, "Kim Long" <kiml@worldnetla.net> posted:

> Can anyone give me a starting place query mysql with a perl script.

how about the mysql modules on CPAN?  they come with documentation :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 30 Nov 1998 21:11:12 GMT
From: ptimmins@netserv.unmc.edu
Subject: Re: Perl CGI program
Message-Id: <73v1l2$sfr$1@nnrp1.dejanews.com>

In article <3662E5C0.8B960A00@sbu.ac.uk>,
  "Dr. Perry Xiao" <xiaop@sbu.ac.uk> wrote:

> Dear all,
>
> I am try to write a CGI program using Perl to allow users to sign the
> guest book in my www page,
> the web page is in .public_html folder and CGI program guestbook.pl is
> in .public_html/cgi-bin/
> folder, both files have been change to "chmod 777", but each when I try
> to run the program, I
> got a error message of
>
> ***********************************************************************
> Method Not Allowed
>
> The requested method POST is not allowed for the URL
> /~xiaop/cgi-bin/guestbook.pl.
> ***********************************************************************
>
> Does anybody know what the problem is?????????

Unrelated to your problem:

Change the permission settings for your directories to 755,
and that of your files to 644 ... and as quickly as possible !

Patrick Timmins
$monger{Omaha}[0]

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 30 Nov 1998 15:44:07 -0600
From: Tim <ringwood@berbee.com>
Subject: Perl DBI error
Message-Id: <366311A7.12BD@berbee.com>

Hello:

I am useing Perl DBI v63 on Lynux and connecting to Empress on another
Lynux box. 

I am issuing the command:

INSERT INTO table_name ("description") VALUES 
  ("Item is from Puetro Rico")

the prepare works, but the execute is returning an error with
a helpful message: Unknown error. It DOES get inserted into the
database correctly. Altering the word "from" to a non-SQL keyword 
gets rid of the error.

Empress is able to handle this fine, the problem is when I use the
DBI. Is there a way to 'escape' the word 'from' so DBI doesn't 'catch'
this error. Sorry I'm anal: I only want errors when they are errors!

(I did try and find something regarding this in archive, but failed.)

thankful for any help!

tim
ringwood@berbee.com


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

Date: Mon, 30 Nov 1998 19:11:14 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: strange behavior with fork and file handles
Message-Id: <F391Aq.FHu@news.boeing.com>

In article <xbxbtlvjvu4.fsf@bolm.ifi.uio.no>,
David Ranvig  <davidra@bolm.ifi.uio.no> wrote:
>Tom Phoenix <rootbeer@teleport.com> writes:
>  .... omitted...
>
>No. I still get far to many lines of output. It seems the parent
>process reads the input file over and over. If I read all the lines
>into an array first, and then iterates over it instead, my program
>works as expected on all platforms, f.eks.
>But I'm still curious why I can't fork while reading from a file.

Because your child process's C<close> of an inherited file 
descriptor won't affect the parent. The parent will still
be able to read from that file. (I'm guessing that's your
intent was because your child process simply closes the file 
and exits). The child does inherit the descriptor and any
of the child's reads will affect the parent though. 

Also, subsequent parents won't be affected by the runtime of 
an earlier fork. So, even if you fork away during the read 
loop as you've done, the parents will be reading freshly from 
the file. Only the parent-child relationship will be somewhat
symbiotic.


hth,
--
Charles DeRykus


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

Date: Mon, 30 Nov 1998 21:08:45 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: top list
Message-Id: <xPD82.67$5g3.100@nsw.nnrp.telstra.net>

In article <73rqst$qhe$1@masala.cc.uh.edu>,
	"Sean Mintz" <stmintz@yahoo.com> writes:

> I am trying to make a top list (like top-ten top-twenty etc)

# perldoc perlfaq4
     How do I sort an array by (anything)?

If there are any other things you are having trouble with, apart from
the sorting, show us your code, and we'll work on that.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Can't say that it is, 'cause it ain't.
NSW, Australia                      | 


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

Date: 30 Nov 1998 15:31:46 -0500
From: ziggy@panix.com (Adam Turoff)
Subject: Re: Training wheels for Perl
Message-Id: <73uvbi$rbd@panix.com>

Jonathan Stowe  <gellyfish@btinternet.com> wrote:
>On 25 Nov 1998 22:48:27 GMT Zenin <zenin@bawdycaste.org> wrote:
>> Tom Phoenix <rootbeer@teleport.com> wrote:
>> 	>snip<
>> : My cat can write better Perl just by walking across the keyboard!
>> 
>> 	And it would be more readable then most Perl code. :-) :-)
>
>In the spirit of enquiry I thought I would put this assertion to the test.
>Not having a cat I simulated the feline footsteps by rolling a grapefruit
>around on the keyboard producing the following:

I think you'd get better results rolling a few thousand pe[a]rls across
your keyboard instead.  Try that, or use a perl keyboard.  You'll need to
simulate two cats - one for the alphanums, and one to play with the 
$, % and @ footpedals.  :-)

HTH!

Z.



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

Date: Mon, 30 Nov 1998 20:05:45 GMT
From: baillie@my-dejanews.com
Subject: What's the best way?
Message-Id: <73utqb$pau$1@nnrp1.dejanews.com>

I have a perl script that reads the output of a command (having to do with
backups) like this: open(FH, "$command |"), and parses the output for
keywords, which it grabs the values of.  The problem is that, there is a
potential for there to be more than 1 backup occuring at the same time, in
that case all output is still provided by the one $command.

How do I break that output up into n sections..do I have to write it to a file
and use tell, seek, and truncate (the only way I can see), or is there a way
that I can continue doing it within memory?

Some values occur more than once throughout a section (i.e. bytes stored is
given as each "cluster" is built, generally a hundred clusters built per
backup)

Any input would be appreciated.  Thanks

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 30 Nov 1998 21:20:56 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: What's the best way?
Message-Id: <Pine.GSO.4.02A.9811301317350.959-100000@user2.teleport.com>

On Mon, 30 Nov 1998 baillie@my-dejanews.com wrote:

> Subject: What's the best way?

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

> I have a perl script that reads the output of a command (having to do
> with backups) like this: open(FH, "$command |"), and parses the output
> for keywords, which it grabs the values of.  The problem is that,
> there is a potential for there to be more than 1 backup occuring at
> the same time, in that case all output is still provided by the one
> $command.

This isn't clear to me. Do you mean that you're running two
(sub-)processes which are doing the same thing?

> How do I break that output up into n sections..

Maybe you want split? Or maybe you want to store the output, as lines,
into an array, then use splice on that array? Hope this helps!

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



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

Date: Mon, 30 Nov 1998 20:02:38 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Y2K and Programmer Denial
Message-Id: <F393oE.552@world.std.com>

les@MCS.COM (Leslie Mikesell) writes:

>Has anyone actually done this to look for '19' used in string context
>in association with a value obtained from a *time() function with
>anywhere near the intensity of 'taint' checking?

I did it somehat jokingly, but another time that this came up I posted
a Verify::Y2K module that had an overloaded tm_year field. It would
die() if the field was used in a string context, or in a numeric
context other than having 1900 added to it or modulus 100.

Its Message-ID: <F1svw6.DtL@world.std.com>
-- 
Andrew Langmead


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

Date: 30 Nov 1998 19:53:13 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Y2K and Programmer Denial
Message-Id: <73ut39$prs$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, les@MCS.COM (Leslie Mikesell) writes:
:Has anyone actually done this to look for '19' used in string context
:in association with a value obtained from a *time() function with
:anywhere near the intensity of 'taint' checking?

There's some talk of localtime and gmtime having an object in the year
slot whose overloaded stringify method blows up.  One could also
an overloaded catenate detect a left-hand operand of "19".

--tom
-- 
    if (rsfp = mypopen("/bin/mail root","w")) {     /* heh, heh */
        --Larry Wall in perl.c from the perl source code


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

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

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