[12432] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6032 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 17 13:27:34 1999

Date: Thu, 17 Jun 99 10:00:21 -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           Thu, 17 Jun 1999     Volume: 8 Number: 6032

Today's topics:
    Re: a thread on threads (the skinny on the schedule) <gbartels@xli.com>
    Re: a thread on threads <gbartels@xli.com>
    Re: Afraid to ask about Y2K! (Lee)
        blank row in array <l463520@lmtas.lmco.com>
        cgi query error <uucon@my-deja.com>
        Embedding Perl in C programs <tony@smee.demon.co.uk>
        Format on array values bernd1615@my-deja.com
    Re: Format on array values <craig@mathworks.com>
    Re: Help me I'm a dummy <cassell@mail.cor.epa.gov>
    Re: How can I get fork to work (in NT)? <cassell@mail.cor.epa.gov>
    Re: How can I get fork to work (in NT)? <cassell@mail.cor.epa.gov>
        How do I jump from one web page to another? <bikejog@zdial.com>
    Re: how to connect to an Oracle database via a cgi scri <rootbeer@redcat.com>
    Re: Inclusive Split (Andrew Johnson)
        Newbie Array Question <gte482i@prism.gatech.edu>
        odd autoincrement behavior ? <prlawrence@lehigh.edu>
    Re: odd autoincrement behavior ? <prlawrence@lehigh.edu>
    Re: odd autoincrement behavior ? <uri@sysarch.com>
    Re: Open2 with smbclient <rootbeer@redcat.com>
    Re: Opening files across the web? <craig@mathworks.com>
    Re: Opening files across the web? <dave@dave.org.uk>
    Re: Perl Script Question <upsetter@ziplink.net>
    Re: Perl Script Question <ludlow@us.ibm.com>
    Re: print command (<<) in perl CGI <cassell@mail.cor.epa.gov>
        Q: http-get <sanface@sanface.com>
        RC5 (nick)
        reloadable script <leonid76@erols.com>
    Re: system call as another user <rootbeer@redcat.com>
        Using Exporter <pavel@asei.cz>
    Re: Win32 select() <cassell@mail.cor.epa.gov>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 17 Jun 1999 11:39:38 -0400
From: Greg Bartels <gbartels@xli.com>
Subject: Re: a thread on threads (the skinny on the schedule)
Message-Id: <376916BA.703D43B3@xli.com>

I contacted Dan Sugalski about perl threads, and
wanted to summarize what came up:

Current perl threads:
(speed compared with unthreaded perl)
worst case: 48%  
mixed case: 63% 

perl 5.005_04 threads:
should be available in a month or two
worst case estimates: 75% 
mixed case estimates: 85% 

perl 5.006
should be available end of '99
performance estimate: 85% to 90%

does anyone contest these numbers to being
significantly off-base?

====

the main arguments agains using threads were
speed and unprotected data. the predictions
above point to threads being nearly on-par
with unthreaded perl by the end of the year,
and I _want_ all data to be shared.

is there any other reason not to use threads?
otherwise it sounds like they solve my
design problem.

Greg


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

Date: Thu, 17 Jun 1999 11:39:03 -0400
From: Greg Bartels <gbartels@xli.com>
Subject: Re: a thread on threads
Message-Id: <37691697.63843467@xli.com>

Uri's post explains how to do state machines 
in perl. a hash with the key being the current state 
and the data being a code ref to call. I got that.

Tramm mentions continuation and scheme, neither of
which I've heard of, but "continuation" sounds like
it might fit what I'm trying to do. from his post,
I assume it is not available in Perl. Can you
elaborate on those briefly, Tramm?

Cameron grabbed onto the final snag, which is the
fact that users will be writing the code, and the
whole point was to make it as simple as possible for
them to write it. 

I could do it explicitely in Verilog or VHDL, and
just describe the hardware directly, but the 
point of this was that both of those languages
are rather clumsy and restrictive in certain 
areas, string handling and file IO are practically
non-existent or very, very difficult to use.
hence, the desire to use perl.


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

Date: Thu, 17 Jun 1999 12:03:21 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <B38E9489966838AC02@204.112.166.88>

In article <3769028f@cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:

>In comp.lang.perl.misc, 
>    lr@hpl.hp.com (Larry Rosler) writes:

[re: my claim that POSIX declares that leap seconds are ignored]

>:I believe that this is a correct statement.  But when asked to, I was 
>:unable to come up with an authoritative reference for it.  Please post 
>:your reference.
>
>    ``It is inappropriate to require that a time represented as seconds
>     since the Epoch precisely represent the number of seconds between
>     the referenced time and the Epoch''
>		    --IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2

Is "inappropriate" committee-ese for an injunction against something?

My own search of library and internet turned up many mentions, but nothing
even vaguely authoritative. I was beginning to suspect that I had done my
small part in perpetuating an "alligator in the POSIX sewers" myth.

Lee




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

Date: Thu, 17 Jun 1999 11:33:55 -0500
From: Michael Hill <l463520@lmtas.lmco.com>
Subject: blank row in array
Message-Id: <37692373.C8EF9F32@lmtas.lmco.com>

I created this array like this:

    @myarr = ($mypart);

then populated it like:

    push (@myarr, "parta");
    push (@myarr, "partb");
    push (@myarr, "partc");

Then when i display the array I have a blank row.

I had to modify my code like below to prevent the blank row.

    @myarr = ($mypart);
 pop(@myarr);
    push (@myarr, "parta");
    push (@myarr, "partb");
    push (@myarr, "partc");

Shouldn't I  be able to create the array empty instead of with a blank
row?

Mike



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

Date: Thu, 17 Jun 1999 15:56:32 GMT
From: Ryan Corder <uucon@my-deja.com>
Subject: cgi query error
Message-Id: <7kb5r9$mmi$1@nnrp1.deja.com>

In my browser, when i run a script using CGI.pm i get the following error:

Software error:
Can't call method "param" without a package or object reference at
/home/domain/public_html/dwctest/upload.cgi line 124.

this is line 124:

if ($query->param) {

this is the line to check if the form is submitted, right?

any ideas?

ryan


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 17 Jun 1999 17:52:42 +0100
From: Tony Smith <tony@smee.demon.co.uk>
Subject: Embedding Perl in C programs
Message-Id: <376927DA.25E7626E@smee.demon.co.uk>

All,

I have some questions regarding Embedding Perl in C programs which I
hope you will be able to help with. First some background so you know
what I am trying to achieve:

I will receive in C, a pointer to a hierarchy of structures which I will
need to access in Perl. It would be ideal if they could retain their
hierarchial structure (i.e. be converted to nested hash/array refs etc)
when they appear in perl space.

Question 1
-----------

I know I can do this if I use perl_call("subroutine",...) having
preprepared the data structures inside the interpreter, but can I still
go this route if I use perl_run() to execute the script?

Question 2
-----------

Is it possible to use the Perl debugger when debugging programs which
embed perl? If so, can someone offer some guidance to get me going.

TIA,

Tony
--
================================================================
Tony Smith
tony@smee.demon.co.uk
Reply address is corrupted to prevent spam. Remove
the spurious underscore to reply.
================================================================





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

Date: Thu, 17 Jun 1999 15:05:36 GMT
From: bernd1615@my-deja.com
Subject: Format on array values
Message-Id: <7kb2ro$lbi$1@nnrp1.deja.com>

Dear Readers ,

I have an array of string values. Each $array[$i] is divided
in Substrings by : as a fieldseperator.
So $array[$i] may appear like

197:Markus:beginner:perl

I want to bring the substrings into format like

foreach (@array) {

format divide_array =

@>>>>>>>>>>>>>   @<<<<<<<<<        @<<<<< @<<<<<<<<<<<
$firstsubstring; $secondsubstring; # ...

 .

but I just don't know how to adress them !

I'd be gratefull for every hint delivered.

Markus Banach


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 17 Jun 1999 12:07:08 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Format on array values
Message-Id: <37691D2C.DFE198A3@mathworks.com>

perldoc -f split

Craig

bernd1615@my-deja.com wrote

> 197:Markus:beginner:perl

>
> but I just don't know how to adress them !
>
> I'd be gratefull for every hint delivered.
>
> Markus Banach
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



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

Date: Thu, 17 Jun 1999 09:37:08 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Bill & Carrie <woof@thegrid.net>
Subject: Re: Help me I'm a dummy
Message-Id: <37692434.111FAF9C@mail.cor.epa.gov>

[courtesy cc sent to poster]

First, let me be pedantic [as opposed to what, you might ask :-]
and point out that your subject line is not a good choice.  In
future on Usenet, you'll get better help if you omit the 'help'
and 'newbie' parts and just put in a short explanation of your
problem.  Here you could have said 'editing html and string
searches'.  That would have gotten you some more useful replies.
That said...

Bill & Carrie wrote:
> 
> I am using a perl script that "prints" out a html file.
> All works fine except I would like to edit out some of the body of the
> html file
> The script forms the <head></head>
> then the <body>
> then prints a variable that contains the entire text of the html file
> $text
> $text is set by the line ($text="finger $info")

Umm, is that supposed to be 
   $text = `finger $info`;
by any chance?  It's hard to tell from here, of course.
But ' and ` and " are different in Perl.  You need to
cut-and-paste so that we don't correct typos instead of real
problems.
 
> I would like to know how to search $text until I match a certain string
> then
> only print what comes after that string (or line)
> 
> Any help will be greatly appreciated

You'll want to read about functions like substr() and index(),
as well as the regular expressions.  If you're really this new
at Perl, you may want to go to this on-line tutorial to get
a good start:

http://www.netcat.co.uk/rob/perl/win32perltut.html

After that, try a few things.  Perl is for playing with, too.
If you're still stuck, come back here [with a better subject
line, please] and show us the bit of code that isn't working,
and you should get some more assistance.

If this post seems less than helpful, remember that this
group tries to live by the old saw, "Give a man a fish and
you feed him for a day, teach a man to fish and you feed him
for a lifetime."  Enjoy learning to fish!

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 17 Jun 1999 09:47:47 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Philip DiFalco <phlippy@bellatlantic.net>
Subject: Re: How can I get fork to work (in NT)?
Message-Id: <376926B3.D741A816@mail.cor.epa.gov>

[courtesy cc to poster]

Philip DiFalco wrote:
> 
> I'm porting some of my UNIX perl to NT.
> I'm running version 5.005_03
> Of course, fork doesn't work.
> How can I get fork to work?

[0] settle for something not too wretchedly different using 
Win32::Process::Create and some of the relevant flags that you
can look up in the docs that come with ActiveState Perl
[1] voodoo using a picture of Bill Gates
[2] install cygwin32 and build perl on that, but it's sloooooow
[3] wait a few months until ActiveState adds fork() into their
install {you can thank Microsoft for that, believe it or not}

I have no better solutions, unfortunately.  Perhaps the people
in the Perl-Win32-users listserv can help you.  You can subscribe
by going to http://www.activestate.com/support/mailing_lists.htm .

> email me at either (or both): phlippy@bellatlantic.net and/or
> difalcop@csosa.fed.us

I'm emailing too, but in usenet it's considered netiquette to
read it in the ng where you posted.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 17 Jun 1999 09:49:11 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How can I get fork to work (in NT)?
Message-Id: <37692707.4FB8F561@mail.cor.epa.gov>

Pavel Hlavnicka wrote:
> 
> Hi,
> It depends ...
> If you want to fork to launch child process and stay alive, you can use
> Win32::Process module, if you want something else, I don't know :-)

But it's important to note that this is not a true fork(), or
even a good approximation.  Still, it may be all that is
required in this case.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 17 Jun 1999 12:43:38 -0400
From: Andrew Chang <bikejog@zdial.com>
Subject: How do I jump from one web page to another?
Message-Id: <376925BA.D40AE225@zdial.com>

Hi,
   This is probably not perl related, but how do I jump to another
web page from my home page automatically?

Andy
mailto:bikejog@zdial.com




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

Date: Thu, 17 Jun 1999 09:45:02 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: how to connect to an Oracle database via a cgi script writtenin Perl
Message-Id: <Pine.GSO.4.02A.9906170941300.13900-100000@user2.teleport.com>

On Thu, 17 Jun 1999, Todd Moore wrote:

> Where should I install the DBD::Oracle module?

First choice is generally under a directory in Perl's default @INC search
path. Second choice is any other available directory, which you'll be able
to add to @INC via the 'use lib' pragma. See the docs for 'lib' for more.

> Is there a DBI that also has to be installed?

The README file for the module should make it clear what else is needed.

> If so, can that be installed in my directory also?

Sure, why not? It sounds good to me. :-)

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



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

Date: Thu, 17 Jun 1999 16:39:54 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Inclusive Split
Message-Id: <ux9a3.7645$9P4.148185@news2.rdc1.on.home.com>

In article <7kb5jj$io4$1@monet.op.net>,
 Mark-Jason Dominus <mjd@op.net> wrote:
! In article <Pine.GSO.4.02A.9906161929210.26850-100000@user1.teleport.com>,
! Tom Phoenix  <rootbeer@redcat.com> wrote:
! >    while ($item_string =~ 
! >	m{
! >	    \G		# From where we left off, find...
! 
! \G is superfluous there; it will match starting at the place it left
! off last time whether or not you put in \G.  \G is for when you have
! two regexes and you want the *second* one to start looking at the
! place where the *first* one left off.

well, superfluous only if the string is known to conform, 
otherwise Tad's loop will stop parsing out X Y pairs
when/if any intervening garbage is encountered. Whether
the original poster wants such behaviour is another question.

regards
andrew


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

Date: 17 Jun 1999 16:52:02 GMT
From: Franklin Edward Sadler <gte482i@prism.gatech.edu>
Subject: Newbie Array Question
Message-Id: <7kb93i$gq7@catapult.gatech.edu>

Is there any way to declare the size of an array in PERL without having to
put anything into it yet? For ex..
Can I Do @Array[4];
Or Do I HAVE to do... @Array = ("","","",""); ?
Anyhelp would be appreciated.
Thanx

Frankie

-- 
M	U	S	T	A	N	G	Z	!
Franklin Edward Sadler
Georgia Institute of Technology, Atlanta Georgia, 30332
Email: gte482i@prism.gatech.edu


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

Date: Thu, 17 Jun 1999 11:35:59 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: odd autoincrement behavior ?
Message-Id: <7kb4lm$1mg8@fidoii.cc.Lehigh.EDU>

Hello,

Please observe odd autoincrement behavior in the following script and output.
It seems as though in the line:
        $h{$_[$idx]} = $_[++$idx];
the autoincrementer is incrementing $idx on both sides of the equal sign before
evaluation.  All comments are welcome.

BACKGROUND:
Example demonstrates desire to process and store certain command line switches
in a hash.

CODE:
______________________________
#!/usr/local/bin/perl -w
use diagnostics;
use strict;

# Let's capture the value for the -a switch...
my %h = ( '-a' => '' );
@_ = ( '-b', 'flim', '-a', 'flam', '-c', 'sam' );
my @leftover;

my $idx = 0;
until ($idx > $#_) {
    if ( exists $h{$_[$idx]} ) {
        $h{$_[$idx]} = $_[++$idx];
    } else {
        push @leftover, $_[$idx];
    }
    $idx++;
}

foreach (keys %h) { print "\$h{$_} = $h{$_}\n" }
foreach (@leftover) { print "leftover: $_\n" }
______________________________

OUTPUT:
$h{flam} = flam
$h{-a} =
leftover: -b
leftover: flim
leftover: -c
leftover: sam



TIA,
--
Phil R Lawrence
Lehigh University
Enterprise Systems Implementation
Programmer / Analyst
prlawrence@lehigh.edu     - work
prlawrence@planetall.com  - personal

--
until (!$self->{'plaid pants'}) { bless $self, $class }




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

Date: Thu, 17 Jun 1999 11:57:44 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: Re: odd autoincrement behavior ?
Message-Id: <7kb5ue$i3q@fidoii.cc.Lehigh.EDU>

Steve wrote:
> > Please observe odd autoincrement behavior in the following script and
output.
> > It seems as though in the line:
> >         $h{$_[$idx]} = $_[++$idx];
>
> That's what you get for pre-incrementing (-:  Try $idx++ (post-increment)!

Hmm..  None of the possible positions for autoincrementing do what I want, which
is to use the current element of $_ as a hash key, and assign the next element
of _ as the value!

OUTPUT for $h{$_[$idx]} = $_[++$idx];
$h{flam} = flam
$h{-a} =
leftover: -b
leftover: flim
leftover: -c
leftover: sam

OUTPUT for $h{$_[$idx]} = $_[$idx++];
$h{flam} = -a
$h{-a} =
leftover: -b
leftover: flim
leftover: -c
leftover: sam

OUTPUT for $h{$_[++$idx]} = $_[$idx];
$h{flam} = -a
$h{-a} =
leftover: -b
leftover: flim
leftover: -c
leftover: sam

OUTPUT for $h{$_[$idx++]} = $_[$idx];
$h{-a} = -a
leftover: -b
leftover: flim
leftover: -c
leftover: sam




----- Original Message -----
From: Phil R Lawrence <prlawrence@lehigh.edu>
Newsgroups: comp.lang.perl.misc
Sent: Thursday, June 17, 1999 11:35 AM
Subject: odd autoincrement behavior ?


> Hello,
>
> Please observe odd autoincrement behavior in the following script and output.
> It seems as though in the line:
>         $h{$_[$idx]} = $_[++$idx];
> the autoincrementer is incrementing $idx on both sides of the equal sign
before
> evaluation.  All comments are welcome.
>
> BACKGROUND:
> Example demonstrates desire to process and store certain command line switches
> in a hash.
>
> CODE:
> ______________________________
> #!/usr/local/bin/perl -w
> use diagnostics;
> use strict;
>
> # Let's capture the value for the -a switch...
> my %h = ( '-a' => '' );
> @_ = ( '-b', 'flim', '-a', 'flam', '-c', 'sam' );
> my @leftover;
>
> my $idx = 0;
> until ($idx > $#_) {
>     if ( exists $h{$_[$idx]} ) {
>         $h{$_[$idx]} = $_[++$idx];
>     } else {
>         push @leftover, $_[$idx];
>     }
>     $idx++;
> }
>
> foreach (keys %h) { print "\$h{$_} = $h{$_}\n" }
> foreach (@leftover) { print "leftover: $_\n" }
> ______________________________
>
> OUTPUT:
> $h{flam} = flam
> $h{-a} =
> leftover: -b
> leftover: flim
> leftover: -c
> leftover: sam
>
>
>
> TIA,
> --
> Phil R Lawrence
> Lehigh University
> Enterprise Systems Implementation
> Programmer / Analyst
> prlawrence@lehigh.edu     - work
> prlawrence@planetall.com  - personal
>
> --
> until (!$self->{'plaid pants'}) { bless $self, $class }
>
>




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

Date: 17 Jun 1999 12:19:03 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: odd autoincrement behavior ?
Message-Id: <x7674mdclk.fsf@home.sysarch.com>

>>>>> "PRL" == Phil R Lawrence <prlawrence@lehigh.edu> writes:


  PRL> Hmm..  None of the possible positions for autoincrementing do
  PRL> what I want, which is to use the current element of $_ as a hash
  PRL> key, and assign the next element of _ as the value!

  PRL> OUTPUT for $h{$_[$idx]} = $_[++$idx];

that (or your other tries) won't work since the prefix ++ is executed before
the assignment is done.

$h{$_[$idx]} = $_[$idx + 1];
$idx++				# should it be += 2 ?

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Thu, 17 Jun 1999 09:55:45 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Open2 with smbclient
Message-Id: <Pine.GSO.4.02A.9906170953520.13900-100000@user2.teleport.com>

On Thu, 17 Jun 1999, Steven R. Evatt wrote:

>    open(PS_WRITE, ">&STDOUT");  #dupe a filehandle for writing
>    open(PS_READ, ">&STDIN");   # dupe a filehandle for reading

If you check your return values from open(), you would find at least
one bug.

> If I try to but a while statement around my first @input = <PS_READ>
> line, my side hangs forever waiting for a prompt.

Have you read what IPC::Open2 says about deadlock? You may need the
four-arg form of select(). Cheers!

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



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

Date: Thu, 17 Jun 1999 12:05:19 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: Opening files across the web?
Message-Id: <37691CBF.E0A1921C@mathworks.com>

Check out LWP::UserAgent

perldoc LWP

will get you started.

Craig

Champneys wrote:

> I'm somewhat of a novice so I hope this doesn't sound too stupid.
>
> I'm trying to write a small PERL program that will take a URL for input and
> then open the html page at the URL across the web for some analysis.  I have
> no clue how to access a web page in this way.  Is there a tutorial somewhere
> how to do this sort of thing?  Some subroutines, or perhaps a book that
> someone might recommend to learn how to do this?
>
> Thanks!
>
> Matt



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

Date: Thu, 17 Jun 1999 17:59:02 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: Opening files across the web?
Message-Id: <37692956.530091A7@dave.org.uk>



Champneys wrote:
> 
> I'm somewhat of a novice so I hope this doesn't sound too stupid.
> 
> I'm trying to write a small PERL program that will take a URL for input and
> then open the html page at the URL across the web for some analysis.  I have
> no clue how to access a web page in this way.  Is there a tutorial somewhere
> how to do this sort of thing?  Some subroutines, or perhaps a book that
> someone might recommend to learn how to do this?

Someone else has already mentioned LWP, but if you want a book that goes
into more detail, try 'Web Client Programming with Perl' by Clinton
Wong.

Oh... and we spell it 'Perl' round these parts.

Dave...


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

Date: Thu, 17 Jun 1999 16:01:24 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Perl Script Question
Message-Id: <oZ8a3.241$7X1.55370@news.shore.net>

I believe your email to your programmer/consultant got posted to
comp.lang.perl.misc by accident.

--Art

John Fung <microfhy@netvigator.com> wrote:
: Perl Script Question

: Dear Sir,

:         I would to have a perl script that when I input
:         my name : JJ and age : 19, then
:         click "Send", it will display in another page :
:         Your Name is JJ
:         Your age is 19

:         Please help me and reply !!
:         Thank you very much for your help !!
: -- 
:                                               Yours sincerely,

:                                                          John Fung

-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Thu, 17 Jun 1999 10:57:15 -0500
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Perl Script Question
Message-Id: <37691ADB.7A1940C1@us.ibm.com>

John Fung wrote:

>         I'm having problem when writing perl script, I would to have

What problem are you having?  It is nearly impossible for anyone to
guess what might be going wrong.  A good question will have:

1. A piece of your code that you're having trouble with.
2. A description of what you think the code should be doing.
3. A sample of the output showing what the code is actually doing.

If you include, at least, those three things, then the odds of getting a
good answer will increase dramatically.

>         a perl script that when I input my name : JJ and age : 19, then
>         click "Send", it will display in another page :
>         Your Name is JJ
>         Your age is 19

This is almost identical to the first example given in the documentation
for CGI.pm.  You should consider reading this documentation.  If you
have CGI.pm already installed, then the docs should be on your system. 
If not, you can read about it at the following URL.

http://stein.cshl.org/WWW/software/CGI/

-- 
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)


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

Date: Thu, 17 Jun 1999 09:00:38 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Allan Masri <amasri@netscape.com>
Subject: Re: print command (<<) in perl CGI
Message-Id: <37691BA6.2AA9FCC4@mail.cor.epa.gov>

[courtesy cc to poster]

Allan Masri wrote:
> 
> Well, that may be, but on page 43 of the camel book, it says:
> "There must be no space between the << and the identifier...The terminating
> string must appear by itself (unquoted and with no surrounding whitespace) on
> the terminating line"
> 
> But even with all that, I can't get the same perl script that runs fine on
> unix to run on NT with ActivePerl. Sheesh!

Then the two most likely suspects (in this order) are:
[1] your 'EOT' is on the last line of your program, and this
just doesn't work on win32 - put a hard return after the EOT
so there's a 'blank' line afterward.
[2] you ftp'ed the script in binary mode so the newlines
didn't get converted to the MS-DOS standard - if so, when
you print this out it should look really weird.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 17 Jun 1999 15:17:48 GMT
From: SANFACE Software <sanface@sanface.com>
Subject: Q: http-get
Message-Id: <7kb3ig$llh$1@nnrp1.deja.com>

I'm testing the old very good software
http://www.tns.lcs.mit.edu/cgi-src/http-get
It works very well on my Windows 95.
On the unix box it doesn't work.
Could you help me?

Thanks in advance

--
SANFACE Software
http://www.sanface.com
mailto:sanface@sanface.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 17 Jun 1999 16:07:28 GMT
From: giordann@icd.cc.purdue.edu (nick)
Subject: RC5
Message-Id: <giordann-1706991107220001@quartz.cc.purdue.edu>

I'm looking for a perl module implementing RC5.  Any suggestions?
Thanks
Nick


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

Date: Thu, 17 Jun 1999 12:52:27 -0400
From: "Leonid Goltser" <leonid76@erols.com>
Subject: reloadable script
Message-Id: <7kb91n$ipk$1@autumn.news.rcn.net>

I want my script reload (refresh) itself in a definite amount of time (like
a chat).
How can I do that?




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

Date: Thu, 17 Jun 1999 09:40:16 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: system call as another user
Message-Id: <Pine.GSO.4.02A.9906170939340.13900-100000@user2.teleport.com>

On Thu, 17 Jun 1999, Steve . wrote:

> I want the call to be run as another user.  How do you do this?

You'll need to read the perlsec manpage about set-id programs. Cheers!

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



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

Date: Thu, 17 Jun 1999 18:10:10 +0200
From: Pavel Hlavnicka <pavel@asei.cz>
Subject: Using Exporter
Message-Id: <37691DE2.4DD35B2A@asei.cz>

Hi all,
simple question for skilled one.

When I write module using Exporter, is starts like this:

package MyPack;

require Exporter;
use vars qw(@ISA @EXPORT_OK @EXPORT);

@ISA = qw(Exporter);
@EXPORT = qw(showmessage);
@EXPORT_OK = qw(showmessage);

In program I write 

use MyModule;

Camel book says, use MyModule means 
BEGIN {
    require "Module.pm";
    Module->import();
}

All I need to know is: Why a have to require (at least) Exporter in
MyModule.
In other words why adding Exporter into @ISA isn't enough? What's
happened while
require Exporter is called (I found no startup code in Exporter).

Thanx a lot

-- 
Pavel Hlavnicka
A.S.E.I. Ltd; Prague
tel.: +420 2 24106102
e-mail: pavel@asei.cz


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

Date: Thu, 17 Jun 1999 09:15:53 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Win32 select()
Message-Id: <37691F39.3BA37533@mail.cor.epa.gov>

donath@my-deja.com wrote:
> 
> In article <37673d30.464744@news.dial.pipex.com>,
>   david.whitmarsh@dial.pipex.com wrote:
> > I think I'm right in saying that windows select() works only on
> > sockets and not on filehandles.
> 
> That's right.  But I'm looking for a way to see if there is data waiting
> to be read on a file handle.  Since select() does not work, perhaps
> someone has another suggestion?

It sounds like what you want is the answer to this question
in perlfaq5: "How do I do a tail -f in Perl?"

If that doesn't suffice, you may also want to ask your
question on the Perl-Win32-users listserv, which can be
subscribed to by going to this URL:
http://www.activestate.com/support/mailing_lists.htm
 
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Or perhaps:
"Share what you don't know is wrong.  Learn what you don't
know is factual."

HTH, 
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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