[22938] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5158 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 30 21:10:52 2003

Date: Mon, 30 Jun 2003 18:10:13 -0700 (PDT)
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 Jun 2003     Volume: 10 Number: 5158

Today's topics:
    Re: Module for sorting (while either reading from or wr <bik.mido@tiscalinet.it>
        newbie needs to globally edit his site <leegold @ mailandnews.com>
    Re: newbie needs to globally edit his site <coo_t2-NO-LIKE-SPAM@yahoo.com>
    Re: newbie needs to globally edit his site <noreply@gunnar.cc>
    Re: Newbie problem with open <eric-amick@comcast.net>
    Re: objects vs sub routines in loop <coo_t2-NO-LIKE-SPAM@yahoo.com>
    Re: objects vs sub routines in loop <llewelly.at@xmission.dot.com>
        Q: detect non-existent hash entries w/function? (Daniel Friedman)
    Re: reading buffered form data (Greg Bacon)
        Reading from piped standard input on w2k <shtil@comcast.net>
    Re: Reading from piped standard input on w2k (Tad McClellan)
        searching or running message <vvikas@cse.buffalo.edu>
    Re: SHIFT not shuffling ? <asu1@c-o-r-n-e-l-l.edu>
    Re: SHIFT not shuffling ? <krahnj@acm.org>
    Re: SHIFT not shuffling ? <mgjv@tradingpost.com.au>
    Re: Speed of file vrs dbase access <Juha.Laiho@iki.fi>
    Re: storing variables using system <abigail@abigail.nl>
    Re: Testing perlfuncs (getopt) for true/false. (yeah i' <uri@stemsystems.com>
    Re: Testing perlfuncs (getopt) for true/false. (yeah i' <thepotplants@yahoo.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 30 Jun 2003 23:59:49 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Module for sorting (while either reading from or writing to) a FH?
Message-Id: <gq81gvgf3o97ppul9tmav3dov5197s8lvh@4ax.com>

On Sat, 28 Jun 2003 14:21:48 -0000, gbacon@hiwaay.net (Greg Bacon)
wrote:

>You could do something similar to the code below.  I don't like
>having to qualify the sort parameters, though.

Thank you for the provided code. I'll study it along with the relevant
docs. It's nice to know that it can be that simple...


On Sat, 28 Jun 2003 10:06:16 -0500, tadmc@augustmail.com (Tad
McClellan) wrote:

>Since the tie code would have to save the whole thing in memory anyway,
>why not just save it in memory in the main program?
>
>That is, use:
>
>   push @out, $_;
>
>instead of
>
>   print $_;

Well, of course this is what I've "always" done. Anyway the basic idea
is that there are some situations (most?) in which it is
conceptually/aesthetically better/reasonable to stick to a
"traditional" solution and others in which using a tie()d FH would be
*appealing* anyway.

In the past I've happened to use code like the following (modulo
typos):

  #!/usr/bin/perl -ni.bak
  use strict;
  use warnings;
  use vars qw/@p/;

  # do something here...
  push @p, $_;
  (print sort @p), @p=() if eof;
  __END__
    
and while I'm rather satisfied with it, I find it an order of
complexity higher than a simple 
    
  #!/usr/bin/perl -pi.bak
  use strict;
  use warnings;

  # do something here...
  __END__

whereas the task it accomplishes is not. But then again this is mainly
a matter of personal tastes.

>> Dually it should work in a similar way for each read().
>
>You must mean readline() since your code does not use read().

Ahemm, obviously! This is what you get of having such a useful
operator as the angle-brackets/diamond one!!

>I don't see the payback for the time that would be required to
>implement tie()ing that would have to buffer the whole thing anyway...

As implicitly assumed above the payback I'm potentially interested in
is not in terms of efficiency, but of clarity, and "separation of
tasks", if this expression makes some sense...

>Do you have some reason that I am overlooking?

Well, another one is the continuous need to continue learning...


Michele
-- 
$\=q.,.,$_=q.print'  ,\g,,( w,a'c'e'h,,map{$_-=qif/g/;chr
}107..q[..117,q)[map+hex,split//,join' ,2B,, w$ECDF078D3'
F9'5F3014$,$,];];$\.=$/,s,q,32,g,s,g,112,g,y,' , q,,eval;


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

Date: Mon, 30 Jun 2003 19:52:02 -0400
From: "leegold" <leegold @ mailandnews.com>
Subject: newbie needs to globally edit his site
Message-Id: <bdqiek$onr$1@bob.news.rcn.net>

my web page are on my remote host in a folder called "www".
There is also a cgi-bin folder and a .admin folder - these are
the defaults on the host I use.

I have 25 web pages w/much text and content. I realize now that
all the pages need the same correction/edit,  a name that was not
capitalized has to changed to a cap.

The regex ect...is not hard. And I'm sure I can figure out
how to step though each file search for the word then
apply a correction. But I really don't know the basics of
running a PERL script on a host. Could someone link
me to some real basic intro sites that might apply?

Thanks




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

Date: Tue, 01 Jul 2003 00:10:50 GMT
From: ed <coo_t2-NO-LIKE-SPAM@yahoo.com>
Subject: Re: newbie needs to globally edit his site
Message-Id: <chj1gv0fsson1goekl3i4b7pcrurr5d00e@4ax.com>

On Mon, 30 Jun 2003 19:52:02 -0400, "leegold" <leegold @
mailandnews.com> wrote:

>Could someone link
>me to some real basic intro sites that might apply?
>
http://perl.com/cs/user/query/q/6?id_topic=35
The "Beginner's Guide to CGI Scripting with Perl" is the one you're
looking for on that page.

http://www.google.com/search?hl=en&ie=ISO-8859-1&q=perl+cgi+tutorial
Can't speak to the quality of any of the content you'll find from that
search.  But I'm sure there's some good ones.

Also go clicking around perldoc.com and perl.com and you're likely to
find a lot more.  

There's no shortage of perl tutorials, that's for sure.

--ed



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

Date: Tue, 01 Jul 2003 02:40:15 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: newbie needs to globally edit his site
Message-Id: <bdqlla$vv3l9$1@ID-184292.news.dfncis.de>

leegold wrote:
> my web page are on my remote host in a folder called "www". There
> is also a cgi-bin folder and a .admin folder - these are the
> defaults on the host I use.
> 
> I have 25 web pages w/much text and content. I realize now that all
> the pages need the same correction/edit,  a name that was not 
> capitalized has to changed to a cap.
> 
> The regex ect...is not hard. And I'm sure I can figure out how to
> step though each file search for the word then apply a correction.

Do you have the original files on your hard disk, and upload them via
FTP? In that case, is it really a good idea to let a program edit the
remote copies directly, leading to the original (local) files differ
from the remote copies? Shouldn't you better make the global editing
stuff locally, and upload the changed pages?

Just a thought.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Mon, 30 Jun 2003 20:46:34 -0400
From: Eric Amick <eric-amick@comcast.net>
Subject: Re: Newbie problem with open
Message-Id: <s3j1gvgek3ahk2g1tfg220cdr4q7et59qi@4ax.com>

On Mon, 30 Jun 2003 06:48:56 GMT, derek / nul <abuse@sgrail.org> wrote:

>On Mon, 30 Jun 2003 06:42:29 +0000 (UTC), efflandt@xnet.com (David Efflandt)
>wrote:
>
>>On Mon, 30 Jun 2003 05:44:37 GMT, derek / nul <abuse@sgrail.org> wrote:
>>> Have been through perldoc -f open and trying to do:-
>>>  open(FH, "<:utf8", "file")
>>> 
>>> My code looks like:-
>>> 
>>> #win32 Activestate 5.8.0
>>> 
>>> use strict;
>>> use warnings;
>>> use Encode qw/encode decode/;
>>> my $dash9=   "c:/program files/microsoft games/train
>>> simulator/trains/trainset/dash9/dash9.eng";
>>> 
>>> open (DASH9, "<:utf16", "$dash9"),   or die "Cannot open $dash9 for read :$!";
>>> 
>>> 
>>> I get the error:-
>>> 
>>> perlio: unknown layer "utf16".
>>> 
>>> What am I doing wrong?
>>
>>According to 'perldoc Encode' under Encoding via PerlIO it looks like you 
>>should be using something like [was there some reason for the extra comma 
>>after your open()]:
>>
>>open (DASH9, "<:encoding(utf16)", "$dash9")
>>    or die "Cannot open $dash9 for read :$!";
>
>hmmm, I did not notice that one.
>didn't make any difference though??

Your remaining problem is the use statement.  You have to put

use Encode;

to get it to work.  Your version is preventing some necessary support
routines from loading.

-- 
Eric Amick
Columbia, MD


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

Date: Mon, 30 Jun 2003 21:59:32 GMT
From: ed <coo_t2-NO-LIKE-SPAM@yahoo.com>
Subject: Re: objects vs sub routines in loop
Message-Id: <q2c1gv03vebie140rse2dc9km6ialcv6nb@4ax.com>

On Sun, 29 Jun 2003 19:44:43 GMT, Bob Walton
<bwalton@rochester.rr.com> wrote:
>Why don't you
>
>     use Benchmark;
>
>and find out the answers to your speed questions on your own objects? 


I'm just starting on writing the OO stuff, so I thought maybe I should
ask before I write it all in an OO style.  
I've really just recently started getting into OOP and I think 
I'm really starting to like it.  So ideally I'd like to use the OO
approach 
for the program.  But if the speed penalty was great, I could do
without object 
oriented code. 


>It seems like you are putting too much emphasis on speed -- by the time 
>you complete your project, Moore's law will have made your speed 
>problems go away anyhow.

You're probably right.
I think I'll just go ahead and use OOP for everything I wanted, in the
way 
that seems natural(confining the object to the scope of the loop).
Then I'll benchmark and see if it seems like it should be faster, then
I'll worry about what 
to do about it.

thanks,
--ed


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

Date: Mon, 30 Jun 2003 17:36:39 -0600
From: llewelly <llewelly.at@xmission.dot.com>
Subject: Re: objects vs sub routines in loop
Message-Id: <86smprqgs8.fsf@Zorthluthik.local.bar>

ed <coo_t2-NO-LIKE-SPAM@yahoo.com> writes:

> On Sun, 29 Jun 2003 19:44:43 GMT, Bob Walton
> <bwalton@rochester.rr.com> wrote:
>>Why don't you
>>
>>     use Benchmark;
>>
>>and find out the answers to your speed questions on your own objects? 
>
>
> I'm just starting on writing the OO stuff, so I thought maybe I should
> ask before I write it all in an OO style.  
> I've really just recently started getting into OOP and I think 
> I'm really starting to like it.  So ideally I'd like to use the OO
> approach 
> for the program.  But if the speed penalty was great, I could do
> without object 
> oriented code.
[snip]

w.r.t to performance of OO code, the best thing you can do is think
    about whether OO is appropriate for your design. Use it where it fits.

if you need OO, you need OO, and emulating OO without using OO
    language constructs is not likely to be faster than using OO
    constructs directly.

To make an analogy, an array is faster than a hash if you don't need
    key => value mappings, but if you do, the array just won't do the
    job, and implementing a hash table by hand is not likely to result
    in faster code than perl's builtin hashes.
    
Don't use OO where it's inappropriate - but recall that when you need
    it, trying to wriggle out of the need is not likely to buy you
    performance. 


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

Date: 30 Jun 2003 18:03:42 -0700
From: danielf@erols.com (Daniel Friedman)
Subject: Q: detect non-existent hash entries w/function?
Message-Id: <68cdce23.0306301703.24297b24@posting.google.com>

I'm trying to figure out how to to detect non-existent hash entries
via a function, something of this general nature:


function hashexists($$) {
# first arg might have to be non-scalar to get this to work,
# that would be OK, too
my var1 = $_[0]; # maybe a scalar, maybe not
my $err_hint = $_[1];

if (exists <something here related to var1>) {
  # If I can get this function to work, maybe I'll redefine
  # it to provide the value of the specified hash,
  # or die otherwise; for now, let's just...
  return(1);
} else {
  die "<something [else?] related to var1> doesn't exist; (hint:
$err_hint)"
  return(0);
}


I haven't been able to do this sort of thing
with "use strict", which I regard as a must;
Any thoughts on how to achieve this?

Thanks very much,
--daniel


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

Date: Mon, 30 Jun 2003 18:51:19 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: reading buffered form data
Message-Id: <vg11l76suci448@corp.supernews.com>

In article <3F0077B0.B91017CF@sprintmail.com>,
    Jeff Thies  <cyberjeff@sprintmail.com> wrote:

: Greg Bacon wrote:
:
: > Doesn't your provider at least enforce separate quotas for temporary
: > directories such as /usr/tmp, /var/tmp/, and /tmp?
: 
: They seem to vary. At least one I work with doesn't, which has been a
: big problem in the past.

It surprises me that CGI.pm doesn't let you set a limit on uploaded
file size.

: > Probably a bad idea.  Have you considered patching CGI.pm to return
: > the file data in a scalar?
: 
: Nope. Is that a tough thing to do? I assumed that it was written in C,
: which I have only a passing knowledge of. I'll go look now...

CGI.pm is written in Perl.  Patching wouldn't be beginner-friendly,
though.

: >  Even so, what are you going to do with
: > the data then?  Net::FTP deals in terms of files.
: 
: Well maybe I'm wrong but I see that Net::FTP has an append method.

Right, but append's arguments are filenames.  If the temp file is too
big to write, then how will you use Net::FTP::append?

Net::FTP::appe [sic] method could be useful, but you'd still need to do
a little legwork.

: Thanks for the reply, after I posted this I realized this may have
: been more of a CGI that perl question

Being lazy and more bug-prone than I'd like, I'd much rather use
tried-and-true code such as the CGI module than roll my own.  YMMV.

Greg
-- 
The coercive power of government is always a beacon to those who want to
dominate others -- summoning the worst dregs of society to Washington to
use that power to impose their will upon others.
    -- Harry Browne


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

Date: Mon, 30 Jun 2003 19:50:19 GMT
From: "Yuri Shtil" <shtil@comcast.net>
Subject: Reading from piped standard input on w2k
Message-Id: <%v0Ma.66976$R73.8957@sccrnsc04>

Hi all

My question is related to both csharp and perl (sort of).

I am trying to fork and exec a csharp program from perl and then feed input
to the csharp.
The problem I am having is that when I am trying to read from Console.In via
Console.Readline the read call never
returns even though I send \n at the end of the string.

Any idea how to make this work ? Do you think the buffering on the perl side
is the problem ?

Yuri




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

Date: Mon, 30 Jun 2003 17:17:16 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Reading from piped standard input on w2k
Message-Id: <slrnbg1dnc.45p.tadmc@magna.augustmail.com>

Yuri Shtil <shtil@comcast.net> wrote:

> Do you think the buffering on the perl side
> is the problem ?


What happened when you turned autoflush on? 

(perldoc -q flush)


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


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

Date: Mon, 30 Jun 2003 19:22:56 -0400
From: Vikas <vvikas@cse.buffalo.edu>
Subject: searching or running message
Message-Id: <Pine.SOL.4.30.0306301920410.3027-100000@hadar.cse.Buffalo.EDU>

hi,

I was wondering as to how can I display some image or display some message
on the page after form submission and then when the perl/cgi program runs
to completion, I refresh the page to display the output of that program,
just like most flight search sites do?

Thanks for the help.

Vikas.


##############################################################
Vikas
Department of Computer Science & Engineering
State University of New York, University at Buffalo
Buffalo, NY 14260
http://www.cse.buffalo.edu/~vvikas

"A love affair with knowledge will never end in heartbreak"
##############################################################




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

Date: 30 Jun 2003 18:09:40 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: SHIFT not shuffling ?
Message-Id: <Xns93AA900E4C4ABasu1cornelledu@132.236.56.8>

stuseven@hotmail.com (stu7) wrote in news:d7dd90b0.0306300956.27120761
@posting.google.com:

> +   Perl's  SHIFT  function seems to say that it both
>  reads, and removes, the first element of whatever array
>  is being used with it... shift or unshift for the first
>  or last array element is a handy idea, although I'm not
>  too sure why a separate function is needed for this...
>   ...thats not my problem though :)

perldoc -f shift explains what shift does very clearly, IMHO.

> 
>     I tried using shift to erase the first element of an
>  array repeatedly, until it was empty... nice for a counting
>  program maybe...
>  
>   $a = shift(@oneTOfive) ;
>    print $a ;
> 
>      ...here is where I got stuck... how do you print the first
>  shifted element, and then get to the next ?  I actually tried 
>  "next", which perl didnt accept.

the while statement comes to mind.

> 
>     I then tried a GOTO loop... and I know this function has
>  many fans in the perl community :)... odd, with a goto, the
>  first element seemed to reprint, like it never got erased ?
>  Also, I tried my first big plate of perl spaghetti :)

I am not sure what a GOTO loop is and you do not show what you did so it 
is hard to figure out how to fix it.

>     So finally... after copying the above two lines for each 
>  element, I was able to erase every element in the array, but 
>  isn't there a simple [next type of thing] to use with SHIFT... 
>  or is it just one of those simple functions that were never 
>  intended to do fancy work ?

Here's my newbie way of doing it:

#! /usr/local/bin/perl

use strict;
use warnings;

use diagnostics;

my @a = qw(one two three four five six);

while(my $a = shift @a) {
	print "$a\n" ;
}

You might want to read about looping and conditionals.

-- 
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov


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

Date: Tue, 01 Jul 2003 00:17:51 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: SHIFT not shuffling ?
Message-Id: <3F00D330.D015AA4F@acm.org>

stu7 wrote:
> 
> +   Perl's  SHIFT  function seems to say that it both
>  reads, and removes, the first element of whatever array
>  is being used with it... shift or unshift for the first
>  or last array element is a handy idea,

shift() for the first element and pop() for the last.

> although I'm not
>  too sure why a separate function is needed for this...

shift() removes an element and unshift() adds an element.

>   ...thats not my problem though :)
> 
>     I tried using shift to erase the first element of an
>  array repeatedly, until it was empty... nice for a counting
>  program maybe...
> 
>   $a = shift(@oneTOfive) ;
>    print $a ;
> 
>      ...here is where I got stuck... how do you print the first
>  shifted element, and then get to the next ?  I actually tried
>  "next", which perl didnt accept.

Try removing the elements to a list and then printing from the list.

for my $a ( splice @oneTOfive ) {
    print $a;
    }


John
-- 
use Perl;
program
fulfillment


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

Date: 01 Jul 2003 00:45:12 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: SHIFT not shuffling ?
Message-Id: <slrnbg1mcq.3er.mgjv@verbruggen.comdyn.com.au>

On 30 Jun 2003 10:56:29 -0700,
	stu7 <stuseven@hotmail.com> wrote:
> +   Perl's  SHIFT  function seems to say that it both
>  reads, and removes, the first element of whatever array
>  is being used with it... shift or unshift for the first
>  or last array element is a handy idea,

You misunderstand. shift() removes the first element, and unshift()
puts a new element at the beginning of an array. The functions pop()
and push() do the same at the end of the array.

>                                         although I'm not
>  too sure why a separate function is needed for this...
>   ...thats not my problem though :)

I'm not sure what you're saying here. Perl has many functions that are
not strictly necessary. shift(), unshift(), pop() and push() can all
be removed, which would mean everyone would just use splice().
However, the four former functions make code just so much more
readable than having splice() everywhere with the larger number of
arguments.

pop could be implemented with two reverse() calls and a shift(), but
do you really want to code that way?

Or are you asking why it should be possible to remove elements from an
array from both ends? Many data structures need that sort of thing. A
FIFO (first in, first out) queue can be implemented with an array and
a combination of unshift/pop or push/shift for adding elements to the
queue and removing them. Sure, it can be implemented in many other
ways that don't require these functions, but having them makes the
code easier to write, understand and maintain. And it prevents you
from having to write them yourself all the time.

Have you ever programmed in more "sparse" languages, like C?

>     I tried using shift to erase the first element of an
>  array repeatedly, until it was empty... nice for a counting
>  program maybe...
>  
>   $a = shift(@oneTOfive) ;
>    print $a ;
> 
>      ...here is where I got stuck... how do you print the first
>  shifted element, and then get to the next ?  I actually tried 
>  "next", which perl didnt accept.

while (@oneTOfive)
{
    my $element = shift @oneTOfive;
    print $element;
}

If you want to preserve the array:

for my $element (@oneTOfive)
{
    print $element;
}

Or shorter:

print for @oneTOfive;

>     I then tried a GOTO loop... and I know this function has
>  many fans in the perl community :)... odd, with a goto, the
>  first element seemed to reprint, like it never got erased ?
>  Also, I tried my first big plate of perl spaghetti :)

Why a goto when there are so many other loop constructions available?
I wouldn't go as far as saying that goto has no place in any
language, Perl specifically, I would say that its use should be
limited as much as possible [1].

>     So finally... after copying the above two lines for each 
>  element, I was able to erase every element in the array, but 
>  isn't there a simple [next type of thing] to use with SHIFT... 
>  or is it just one of those simple functions that were never 
>  intended to do fancy work ?

This really has little to do with shift(). It has to do with your
apparent lack of knowledge of the normal looping constructs. Have a
look at the perlsyn documentation for a thorough discussion of them.
And while all those looping constructions can be rewritten using goto,
I would simply not go there.

Martien

[1] I am only talking about goto LABEL and goto EXPR. goto &SUB is a
different sort of beast, called by the same keyword.
-- 
                        | 
Martien Verbruggen      | The world is complex; sendmail.cf reflects
Trading Post Australia  | this.
                        | 


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

Date: Mon, 30 Jun 2003 19:12:00 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: Speed of file vrs dbase access
Message-Id: <bdq20r$kic$1@ichaos.ichaos-int>

"Fatted" <fatted@yahoo.com> said:
>Data currently is stored in a plain text file on linux system, less than
>600 ascii chars per file, perhaps 100 files. Accessed using perls open
>command and <>.
>I'm thinking of storing contents of each file in a table, 1 file content
>per row.

For these both: do you tend to keep just one sheet of paper in each
deskside drawer?

So, the organisation looks _very_ strange to me. And as your amount
of data is overall ~60kB, there isn't much difference how you access it.

It seems to me that you're using the file name as a key to the contained
information. And by some magic you always know which file you want to
open. Is this so? (instead of just reading through all the files just to
find out that it was actually the last one that you really needed)

If this is so (that you have now 100 pieces of data, and are using
the file name as the search key, and the search key is unique), I
think I'd like to introduce you to DB_File. It allows you to have
simple key-value -databases, and retrieve single data items by the
key.

Where any SQL database would enter the arena is when you have more
than one data relation - which you currently apparently don't have.
For this they'd be overkill -- but certainly usable; most possibly
with a model of having one table with one key column and one data
column.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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

Date: 30 Jun 2003 19:35:53 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: storing variables using system
Message-Id: <slrnbg148p.el.abigail@alexandra.abigail.nl>

dipu bhaskar (bhdipu@yahoo.com) wrote on MMMDXC September MCMXCIII in
<URL:news:17c3ed23.0306300631.65a8b690@posting.google.com>:
##  hi
##  
##    i am doing a unix operation in perl using the "system" command,and i
##  want this to be stored into a variable,hence this variable should be
##  accessed by perl


Did you look what the manual page has to say about "system"?
If so, can you describe which part you didn't understand?


Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


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

Date: Mon, 30 Jun 2003 23:36:43 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Testing perlfuncs (getopt) for true/false. (yeah i'm newbie.)
Message-Id: <x74r279lys.fsf@mail.sysarch.com>


no attachments. just paste in the code or a url to it.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Tue, 1 Jul 2003 11:41:02 +1200
From: "ThePotPlants" <thepotplants@yahoo.com>
Subject: Re: Testing perlfuncs (getopt) for true/false. (yeah i'm newbie.)
Message-Id: <MT3Ma.60453$JA5.1088861@news.xtra.co.nz>

"Uri Guttman" <uri@stemsystems.com> wrote in message
news:x74r279lys.fsf@mail.sysarch.com...
> no attachments. just paste in the code or a url to it.

<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
    <DT><A HREF="http://lcg-www.uia.ac.be/~erikt/perl/ln02.html"
ADD_DATE="1056854755" LAST_VISIT="1057014456" LAST_MODIFIED="1056854758">A
Shortcut to Perl (2)</A>
    <DT><A HREF="file:///C:/Perl/html/faq/Windows/ActivePerl-Winfaq.html"
ADD_DATE="1055910976" LAST_VISIT="1057014458"
LAST_MODIFIED="1055910976">ActivePerl faq - ActivePerl Frequently Asked
Questions</A>
    <DT><A HREF="http://activestate.com/" ADD_DATE="1053406411"
LAST_VISIT="1057014458" LAST_MODIFIED="1052718570">ActiveState Perl</A>
    <DT><A HREF="http://tech.irt.org/articles/js127/" ADD_DATE="1054780677"
LAST_VISIT="1057014458" LAST_MODIFIED="1054780678">Deleting Files in
Perl</A>
    <DT><A HREF="http://www.devdaily.com/perl/edu/qanda/plqa00001.shtml"
ADD_DATE="1056426316" LAST_VISIT="1057014456"
LAST_MODIFIED="1056426316">DevDaily - Learn Perl Perl Q&A Reading
command-line arguments</A>
    <DT><A HREF="http://www.effectiveperl.com/recipes/sorting.html"
ADD_DATE="1056854978" LAST_VISIT="1057014456"
LAST_MODIFIED="1056854978">Effective Perl - Recipes for sorting</A>
    <DT><A
HREF="http://www.perldoc.com/perl5.8.0/pod/perlfaq8.html#How-do-I-add-the-di
rectory-my-program-lives-in-to-the-module-library-search-path-"
ADD_DATE="1054606085" LAST_VISIT="1057014456"
LAST_MODIFIED="1054606085">http--www.perldoc.com-perl5.8.0-pod-perlfaq8.html
</A>
    <DT><A HREF="http://www.theperlreview.com/Articles/v0i4/golf.pdf"
ADD_DATE="1055824963" LAST_VISIT="1057014458"
LAST_MODIFIED="1055824964">http--www.theperlreview.com-Articles-v0i4-golf.pd
f</A>
    <DT><A HREF="http://www.devdaily.com/perl/edu/qanda/"
ADD_DATE="1056426574" LAST_VISIT="1057014458"
LAST_MODIFIED="1056426574">Learn Perl Perl Question & Answer Center</A>
    <DT><A HREF="http://perlmonks.com/index.pl?node_id=102347"
ADD_DATE="1053404081" LAST_VISIT="1057014455"
LAST_MODIFIED="1053404082">Perl Monks</A>
    <DT><A HREF="http://www.perl.com/pub/a/2003/05/29/treasures.html"
ADD_DATE="1055239920" LAST_VISIT="1057014458"
LAST_MODIFIED="1055239920">perl.com Hidden Treasures of the Perl Core [May.
29, 2003]</A>
    <DT><A HREF="http://www.perl.com/" ADD_DATE="1054597618"
LAST_VISIT="1057014458" LAST_MODIFIED="1054597619">Perl.com The Source for
Perl -- perl development, perl conferences</A>
    <DT><A HREF="http://perl.oreilly.com/" ADD_DATE="1053405893"
LAST_VISIT="1057014458" LAST_MODIFIED="1053405893">perl.oreilly.com --
Welcome to the O'Reilly Perl Center -- computer books, perl books, perl
programming</A>
    <DT><A HREF="http://www.perldoc.com/perl5.8.0/lib/lib.html"
ADD_DATE="1054603910" LAST_VISIT="1057014458"
LAST_MODIFIED="1054603911">perldoc.com</A>
    <DT><A HREF="http://www.xav.com/perl/lib/Pod/perlfunc.html"
ADD_DATE="1056851805" LAST_VISIT="1057014456"
LAST_MODIFIED="1056851806">perlfunc - Perl builtin functions</A>
    <DT><A HREF="http://www.ourwasteland.com/phpwiki/index.php/PerlExamples"
ADD_DATE="1056424110" LAST_VISIT="1057014458"
LAST_MODIFIED="1056424111">PhpWiki - Perl Examples</A>
    <DT><A HREF="http://search.cpan.org/" ADD_DATE="1053393228"
LAST_VISIT="1057014455" LAST_MODIFIED="1053393229">search.cpan.org The CPAN
Search Site</A>
</DL><p>





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

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


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