[10164] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3757 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 19 05:07:23 1998

Date: Sat, 19 Sep 98 02:00:18 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 19 Sep 1998     Volume: 8 Number: 3757

Today's topics:
        _runops undefined : Update <ntemple@pobox.com>
    Re: _runops undefined : Update <nguyend7@msu.edu>
    Re: Can I run Perl program regularly? <ywwong_hk@hotmail.com>
        Can't use Socket module on Windows? sethkatz@my-dejanews.com
    Re: ePerl Error in Here-Document String <mpersico@erols.com>
        How do I take @_ and set it to $foo? <vpadua@csufresno.edu>
    Re: How do I take @_ and set it to $foo? <rra@stanford.edu>
    Re: How do I take @_ and set it to $foo? (Sam Holden)
    Re: how safe is xor encryption ? (David Formosa)
    Re: IO::Select Problems <jimbo@soundimages.co.uk>
    Re: Javascript or Perl or Java? (Anthony Boyd)
    Re: Perl & Java - differences and uses <ajohnson@gpu.srv.ualberta.ca>
        Perl Compiler <ntemple@pobox.com>
        perl script error (CA Aspiras)
    Re: perl video games (Tye McQueen)
    Re: Please Help <uri@sysarch.com>
    Re: Question about regex across multiple lines (David A. Black)
        Shell-scripts and #! ( big dilemma ) ! (Serge Noiraud)
        what's wrong with win32 perl ? <bgates@microsoft.com>
    Re: where is Date::Parse? (Michael Fuhr)
    Re: where is Date::Parse? <rra@stanford.edu>
    Re: where is Date::Parse? <ajohnson@gpu.srv.ualberta.ca>
    Re: where is Date::Parse? <rra@stanford.edu>
    Re: where is Date::Parse? <ajohnson@gpu.srv.ualberta.ca>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Sat, 19 Sep 1998 06:28:29 GMT
From: Nick Temple <ntemple@pobox.com>
Subject: _runops undefined : Update
Message-Id: <36034F57.BF412C0E@pobox.com>

I've determined that the problem specifically has to do with eval().  If
I comment out any lines using eval(), things compile & work fine.

I still need to be able to use eval.  Any suggestions? 


Thanks,

Nick


Nick Temple wrote:
> 
> Hi --
> 
> I'm attempting to compile some perl sources, and keep running into the
> same problem:
> 
>   Undefined symbol `_runops' referenced from text segment
> 
> Where should _runops be defined?  It is not anyplce in the produced C
> text, I am assuming that it is a linking problel...
> 
> Anyway. help appreciated as always.
> 
> Thanks,
> 
> Nick
> 
> Output of a sample session:
> 
> Making C(vsa_jump.pl.c) for vsa_jump.pl!
> /home/ntemple/bin/perl -I/home/ntemple/lib/perl5/5.00502/i386-freebsd
> -I/home/ntemple/lib/perl5/5.00502 -I/home/ntemple/lib/perl5/si
> te_perl/5.005/i386-freebsd -I/home/ntemple/lib/perl5/site_perl/5.005 -I.
> -MO=CC,-ovsa_jump.pl.c vsa_jump.pl
> vsa_jump.pl syntax OK
> Compiling C(vsa_jump) for vsa_jump.pl!
> /home/ntemple/bin/perl -I/home/ntemple/lib/perl5/5.00502/i386-freebsd
> -I/home/ntemple/lib/perl5/5.00502 -I/home/ntemple/lib/perl5/si
> te_perl/5.005/i386-freebsd -I/home/ntemple/lib/perl5/site_perl/5.005 -I.
> /tmp/vsa_jump.pl.tst
> cc -I/usr/local/include -O
> -I/home/ntemple/lib/perl5/5.00502/i386-freebsd/CORE
> /home/ntemple/lib/perl5/5.00502/i386-freebsd/auto/Fcn
> tl/Fcntl.so
> /home/ntemple/lib/perl5/site_perl/5.005/i386-freebsd/auto/CommerceLink/CommerceLink.so
> -o vsa_jump vsa_jump.pl.c  -L/usr
> /local/lib -L/home/ntemple/lib/perl5/5.00502/i386-freebsd/CORE -lperl
> -lm -lc -lcrypt
> /var/tmp/ccnc45771.o: Undefined symbol `_runops' referenced from text
> segment
> ERROR: In compiling code for vsa_jump.pl.c !


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

Date: 19 Sep 1998 06:31:44 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: _runops undefined : Update
Message-Id: <6tvj4g$4oo$1@msunews.cl.msu.edu>

Nick Temple <ntemple@pobox.com> wrote:
: I've determined that the problem specifically has to do with eval().  If
: I comment out any lines using eval(), things compile & work fine.

: I still need to be able to use eval.  Any suggestions? 

This message won't be very useful, but my suggestion is to not use the
compiler.  It's still alpha and won't usually compile most complex
things.

-dan

-- 
           Dan Nguyen            | There is only one happiness in
        nguyend7@msu.edu         |   life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 |                   -George Sand



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

Date: Sat, 19 Sep 1998 16:57:48 +0800
From: Y W Wong <ywwong_hk@hotmail.com>
Subject: Re: Can I run Perl program regularly?
Message-Id: <3603720C.81A845FC@hotmail.com>

For csh :-

while(1)
    date | grep -e ":05:"
    if ($status == 0) then
        script
        sleep 60
    endif
    sleep 30
end

The above must run at background, you may logout after running the script.
It will execute hourly at HH:05 , it will check the date every 30 seconds and

the sleep 60 prevent it run more than once hourly.

Change the line for running daily :-

date | grep -e " 18:00:"

It will run daily at 18:00, please mind the space included infront of 18:00:

The execution time will not deviated for more than 30 seconds no matter the
script execution time are varied.
Provided that you are not allowed to use crontab and the script
execution time will take less than 59 minutes !

Y W Wong


Paul Marsh wrote:

> If your using windows nt use the AT command,
>
> D wrote in message <358ecba4.0@rapeme.kirov.ru>...
> >Dear Sir/Madam
> >
> >How can I make a program that can run my Perl program regularly (daily)?
> >
> >Thanks in advance
> >
> >Best wishes
> >
> >





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

Date: Sat, 19 Sep 1998 06:42:56 GMT
From: sethkatz@my-dejanews.com
Subject: Can't use Socket module on Windows?
Message-Id: <6tvjpg$p3q$1@nnrp1.dejanews.com>

I have just successfully installed ActiveState's Perl on my Windows98
computer successfully.  Most programs I use run smoothly, but virtually
every sockets call I make in my program fails silently.  I am able
to use networking on my computer successfully in the Java language, and
from compiled applications such as the MSIE browser.  Therefore, I believe
I must be encountering a glitch in ActiveState's perl port (version
5.00502.exe).

Examples:

use Socket;
$port = getservbyname("http","tcp");
print $port;

I have also tried
use IO::Socket;
$port = getservbyname("http","tcp");
print $port;

Both of these programs print nothing. I'm not sure getservbyname is a
Socket's call.  However, I have tried more unambiguously sockets programs
and they have also failed.

I tried this program because I thought it would work since it is the answer
to a previous post:

use IO::Socket;

$sock = new IO::Socket::INET(PeerAddr=>"www.yahoo.com",PeerPort=>80);
print $sock "GET / HTTP/1.0\r\n";
while (<$sock>) {
	print;
}

This program prints nothing to my screen.  It takes almost 3 minutes to
complete.

I have not seen anyone post similar problems to this news group.
Is it possible that the source binaries for Perl need to make a call to
Windows socket initialization routines of some sort but don't?

My Windows settings are DNS disabled, WINS disabled, no gateways, dynamically
allocated IP address.  I connect over a T1 line to Pacific Bell T1 Internet.
These are the settings the Pacific bell manual suggested(and again, they work
for
everything I've tried except Perl.)  I may be behind a firewall, but
again, all my Web browsing works so it seems this program should do (I
have not configured MSIE to use a particular proxy to retrieve Web traffic
so the firewall is not the problem, I think).

Please help if you can.  I would really appreciate it.  Also, if you could
forward any helpful information to my email [sethkatz@cs.stanford.edu]
in addition to this newsgroup, that would help me.

Thanks in advance.

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


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

Date: Sat, 19 Sep 1998 02:40:34 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: ePerl Error in Here-Document String
Message-Id: <360351E2.E58BA2B4@erols.com>

The end of the here do must match the beginning EXACTLY. The begining is
"LOCATION_EOT".
The end is "      LOCATION_EOT". Note the extra spaces! Leading and
trailing spaces matter with here doc markers.

Furthermore, since the error complains about AREA_EOT, I bet you have
another here doc befor this that hs the same problem.

Bruce Hodo wrote:
> 
> I am trying to use ePerl. I have the following code in my cgi file at
> line 171:
> 
>  my $SQL = <<"LOCATION_EOT";
> 
>  select
>  distinct Location
>  from Jamaica
>  order by Location
> 
>      LOCATION_EOT
> 
> I ran the eperl preprocessor with the flags -wc and got an OK on the
> syntax. But when I load the page I get the following error page on my
> browser:
> 
> ERROR:
>        Perl parsing error (interpreter rc=2)
> 
>        Contents of STDERR channel:
>        Can't find string terminator "AREA_EOT" anywhere before EOF at
> myfile.cgi line 171.
> 
> I must be doing something wrong, but I'm not seeing it. Does anybody
> have a clue?
> --
>                  Bruce Hodo - Webmaster, GetAwayNetwork, Inc.
>      ==Providing unique vacation information on the World Wide Web==
>        For Villas, Resorts, Hotels, Air/Hotel Packages, Charter Airfares
> 
>                               And Now Offering Travel Auctions!
> =============== Visit us at http://getawaynet.com ===============

-- 
Get "The Perl Cookbook"
Christansen and Torkington. 
O'Reilly. ISBN 1-56592-243-3
FAQ on serious steriods!


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

Date: Wed, 16 Sep 1998 15:19:57 -0700
From: Vince Padua <vpadua@csufresno.edu>
Subject: How do I take @_ and set it to $foo?
Message-Id: <3600398B.2B0B10D4@csufresno.edu>

Disclaimer : Newbie.

How do I take a integer say 1234567.123456789 that is in @_ and put it
in $foo?



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

Date: 19 Sep 1998 00:12:21 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: How do I take @_ and set it to $foo?
Message-Id: <ylg1dor2y2.fsf@windlord.stanford.edu>

Vince Padua <vpadua@csufresno.edu> writes:

> How do I take a integer say 1234567.123456789 that is in @_ and put it
> in $foo?

        ($foo) = @_;

The trick to remember is that to pull something out of an array
nondestructively, you probably want to do a list assignment, which means
that the left hand side needs to be a list, not a scalar.  If you do:

        $foo = @_;

then you're getting the value of @_ as a scalar, which is the number of
elements in @_.

Another way to do this is:

        $foo = shift @_;

which grabs the first element of @_, or more succinctly if you're in a
sub:

        $foo = shift;

That's a fairly common idiom; I use it a lot with subs that only take one
argument.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 19 Sep 1998 08:51:58 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: How do I take @_ and set it to $foo?
Message-Id: <slrn706s5e.3hb.sholden@pgrad.cs.usyd.edu.au>

On Wed, 16 Sep 1998 15:19:57 -0700, Vince Padua <vpadua@csufresno.edu> wrote:
>Disclaimer : Newbie.
>
>How do I take a integer say 1234567.123456789 that is in @_ and put it
>in $foo?
>

Well that would be impossible since that is not an integer...

-- 
Sam

You can blame it all on the internet. I do...
	--Larry Wall


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

Date: 19 Sep 1998 18:12:50 +1000
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: how safe is xor encryption ?
Message-Id: <6tvp22$79f$1@godzilla.zeta.org.au>

In <3602D9BC.6E62CA71@bbnplanet.com> Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> writes:

[...]

>I just ordered a copy from amazon. :) I still am resistant to say that
>anything is 100% secure. They said the Titanic was unsinkable too. 

Given the correct implentation and if peaple follow the correct protocol
a one time pad is 100% secure.  Of cause the real way to brake a OTP is
to attack the peaple arround it.  

If you have a system useing peaple who know the protcol and can work with
in it then it is secure.  However the custermors are unlikely to be able to 
do this.  So I would recommned one of the standard protocols like 3Des or
 Blowfish.

Another option nis to use gnupg wich is a GPL'ed PGP compatable program.



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

Date: 19 Sep 1998 09:26:44 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: IO::Select Problems
Message-Id: <uemt8qzi3.fsf@jimbosntserver.soundimages.co.uk>

"Edwin S. Ramirez" <edwin.ramirez@erols.com> writes:

> 
>     I have a network app which uses IO::Socket and IO::Select to listen
> for connections and incomming messages.  The problem is that when the
> program receives multiple lines, how do I find out how many lines of
> data are awaiting on the socket?
> 

Why do you need to know how many lines of data are available? Just
read x bytes from the socket and then go back to select. If there is
more data to be read, then select will let you know and you read x
bytes again. This process continues until the socket is no longer
ready for reading. select will then block until the socket is ready to
read or write or has an error depending on how you've set up your
select.

Put the data you've read into a buffer and examine the buffer to
determine how many lines there are. The job of select is to simply
advise when a socket is ready to read or write or has an error. Not to
advise the quantity or quality of that data.
-- 
Jim Brewer
e-mailed courtesy copies are unappreciated, please refrain.


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

Date: Sat, 19 Sep 1998 00:31:05 -0800
From: anthony@outshine.com (Anthony Boyd)
Subject: Re: Javascript or Perl or Java?
Message-Id: <anthony-1909980031050001@oak-usr1-54-54.dialup.slip.net>

"GaRgL" <gargl@worldnet.net> wrote:

> >Please can somebody clarify the difference between  using Javascript, Java,
> >Perl? As a Beginner what should a person know to start off with Internet
> >Programming?
> 
> javascript : small work, form checking, roll overs, etc...
> java : animations, real-time, etc...
> perl : working with files, anything you need to remember later (eg. forums,
> guest books)

For what it's worth, JavaScript can do animations (which you listed under
Java) by accessing objects on the page and incrementing their "top" and
"left" css properties.  Also, server-side JavaScripts and client-side
JavaScripts that have been "signed" can work with files & maintain
persistent data (which you list under Perl).  However, JavaScript doesn't
have half the useful functions that Perl has for checking the files,
extracting data, etc.  And signing scripts is a pain in the ass.

JavaScript: interpreted (text) requires browser/server to run, mostly on
client side for the things Gargl mentioned (form checking, customizing
pages on the fly without reloading, roll-overs, etc.).  JavaScript has a
massive userbase, but since it's generally considered a lightweight
programming language used to trick out Web pages, it's not usually the
kind of thing that'll get you a job (although it got me mine).

Java: compiled (kinda -- bytecode) requires some kind of Java virtual
machine, but it could be anywhere (part of a browser for applets, or built
into the OS for full-blown applications).  Used for lots of enterprise
stuff at this point.  Java will get you the most work and put food on the
table, but a lot of it probably won't have much to do with Web pages or
Web sites, although networking in general sure figures prominently.

Perl: usually interpreted, but Perl 5.005 promises to make compiled code a
true, built-in option (you can get an add-on now).  Mostly server-based
for CGIs when it comes to Internet programming, and pretty great at it
too.  Lots of text handling tools, good for logging form data, generating
reports, and so on.  Perl too will make you employable, and certainly make
you productive, and keep you closer to Web-related work, although it's not
as sexy (or difficult) as Java or as flashy as JavaScript.

-Tony


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

Date: Sat, 19 Sep 1998 00:46:58 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Perl & Java - differences and uses
Message-Id: <36034552.5BBC535D@gpu.srv.ualberta.ca>

George Reese wrote:

[snip stuff and good quote from larry]
> 
> It is not beauty that I am arguing is goodness--it is structure that
> is goodness.  Certainly not any structure, but structure that enables
> one to accomplish any functionality they wish without compromising the
> structure of the whole.  Perl does not do that.  Python does.

if you can't write stuctured code that's not Perl's fault. Perl allows
freedom, 'programmer, enable thyself!' ... (or choose a language that
chooses your enablement (sic) for you).

regards
andrew


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

Date: Sat, 19 Sep 1998 05:57:13 GMT
From: Nick Temple <ntemple@pobox.com>
Subject: Perl Compiler
Message-Id: <36034803.D2DF27BE@pobox.com>

Hi --

I'm attempting to compile some perl sources, and keep running into the
same problem:

  Undefined symbol `_runops' referenced from text segment

Where should _runops be defined?  It is not anyplce in the produced C
text, I am assuming that it is a linking problel...

Anyway. help appreciated as always.

Thanks,

Nick


Output of a sample session:

Making C(vsa_jump.pl.c) for vsa_jump.pl!
/home/ntemple/bin/perl -I/home/ntemple/lib/perl5/5.00502/i386-freebsd
-I/home/ntemple/lib/perl5/5.00502 -I/home/ntemple/lib/perl5/si
te_perl/5.005/i386-freebsd -I/home/ntemple/lib/perl5/site_perl/5.005 -I.
-MO=CC,-ovsa_jump.pl.c vsa_jump.pl
vsa_jump.pl syntax OK
Compiling C(vsa_jump) for vsa_jump.pl!
/home/ntemple/bin/perl -I/home/ntemple/lib/perl5/5.00502/i386-freebsd
-I/home/ntemple/lib/perl5/5.00502 -I/home/ntemple/lib/perl5/si
te_perl/5.005/i386-freebsd -I/home/ntemple/lib/perl5/site_perl/5.005 -I.
/tmp/vsa_jump.pl.tst
cc -I/usr/local/include -O
-I/home/ntemple/lib/perl5/5.00502/i386-freebsd/CORE
/home/ntemple/lib/perl5/5.00502/i386-freebsd/auto/Fcn
tl/Fcntl.so
/home/ntemple/lib/perl5/site_perl/5.005/i386-freebsd/auto/CommerceLink/CommerceLink.so
-o vsa_jump vsa_jump.pl.c  -L/usr
/local/lib -L/home/ntemple/lib/perl5/5.00502/i386-freebsd/CORE -lperl
-lm -lc -lcrypt
/var/tmp/ccnc45771.o: Undefined symbol `_runops' referenced from text
segment
ERROR: In compiling code for vsa_jump.pl.c !


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

Date: Wed, 16 Sep 1998 04:11:58 GMT
From: saints@jps.net (CA Aspiras)
Subject: perl script error
Message-Id: <35ff344b.18063955@news.jps.net>

i have this perl counter script that seems to work fine but somehow
server logs show a failure with this error message:

	Premature end of script headers

any ideas on what's causing that error message?

thanks,

CA Aspiras





the code of the counter:
----------------------------
#!/usr/bin/perl 

$file = '/home/usr1/cgi-bin/count.txt';

print "Content-type: text/html\n\n"; 
open (COUNT, $file);
$count = <COUNT>;
close(COUNT);
++$count;
@nums = split(//, $count); 

foreach $num (@nums) {
	$display = "$num";
	 print $display;
}                       

open (COUNT, ">$file"); 
print COUNT $count; 
----------------------------

executed via ssi tag:
<!--#exec cgi="/cgi-bin/count.pl" -->



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

Date: 19 Sep 1998 02:54:32 -0500
From: tye@fohnix.metronet.com (Tye McQueen)
Subject: Re: perl video games
Message-Id: <6tvnvo$am4@fohnix.metronet.com>

) In article <36016E62.5EC1AC0@gaming-age.com>,
) Adam Ziegler  <Adamz@gaming-age.com> wrote:
) >Would it ever be possible to program video games with PERL, even simple
) >ones?

mcafee@waits.facilities.med.umich.edu (Sean McAfee) writes:
) It's possible now, and has been for a while.  For example, Sriram
) Srinivasan's book "Advanced Perl Programming" contains code for a Tetris
) game, using the Tk module.

I wrote Spider solitare in Perl4.  A bit of a stretch for the term
"video game", but then every version of tetris I've played in the
last 3 years has run on a "dumb" (ASCII) terminal.

I just hard-coded the few escape sequences I needed in.  I'd be
fancier if I rewrote it now.
-- 
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)


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

Date: 19 Sep 1998 01:52:24 -0400
From: Uri Guttman <uri@sysarch.com>
To: koh_cc@pacific.net.sg
Subject: Re: Please Help
Message-Id: <x71zp8y7hj.fsf@sysarch.com>

>>>>> "S" == Steven  <koh_cc@pacific.net.sg> writes:

  S> hi, Can any help to answer this question.

  S>  I have a website with an Links form on a NT server. I just came
  S> accross a problem, when a user enters data and then 'submits' it,
  S> an error occurs which states 'http/1.0 501 not supported'. Can
  S> anybody tell me what this means? I'm checking to see if it might be
  S> a server error. thanks in advance

this is not a perl problem. please post this to web server groups like

comp.infosystems.www.servers.*

hth,

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


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

Date: Fri, 18 Sep 1998 19:55:23 EDT
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: Question about regex across multiple lines
Message-Id: <6turtb$q00$1@earth.superlink.net>

Hello -

mlewis@nmia.com (Michael D Lewis) writes (in part):


>   Here's an example of the input file:
>   
><3> 1 fred
>barney
><5> 2 wilma
>betty

>   And here's what it should look like on the output:
>   
><3> 4 fred
>barney
><5> 10 wilma
>betty


>So my program would do a "m/<(\d)>/" . If it was successful, it would do
>the math on the number it would find, and do a 
>"s/<(\d)>/\s+\d+\s+/<$1> $newvalue /".
>This worked until I found out that the input file could also look like:

><3>
> 1 fred
>barney
><5> 2 wilma
>betty

>   To span multiple lines I added the line $/ = ".\n"; to the program.


Remember that $/ is a string, not a regular expression.  That string
doesn't occur in your input data.

Assuming that you can be sure that the regexes below will match only 
when you want them to (i.e., that there's nothing in the intervening
lines that will cause confusion), you could try something like this:


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

use strict;

my ($brack, $rt);

print map {
   $brack    = $1             if /<(\d+)>/;
   s/$1/$rt += 1 + $brack/e   if /\s(\d+)\s/;
   $_
          } <DATA>;

__DATA__
<3> 1 fred
barney
<3>
 1 fred
<5> 2 wilma
betty


which yields:

<3> 4 fred
barney
<3>
 8 fred
<5> 14 wilma
betty


David Black
dblack@saturn.superlink.net


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

Date: 17 Sep 1998 13:03:58 GMT
From: Serge.Noiraud@bull.net (Serge Noiraud)
Subject: Shell-scripts and #! ( big dilemma ) !
Message-Id: <6tr1bu$32ti@soprox-in.bull.fr>

I have one big dilemma !

I have an environment variable called PREFIX which is in my HOME directory.
This variable is defined like this :
$HOME/local/$SYSTEM$VERSION

So I have the following directories :
$HOME/local/IRIX4/( bin, lib, ... )
$HOME/local/IRIX5/...
$HOME/local/IRIX6/...
$HOME/local/AIX32/...
$HOME/local/AIX41/...
$HOME/local/AIX42/...
$HOME/local/AIX43/...
 ...

My HOME directory is mounted by NFS.
I choose the good bin directory depending the system I work on.

All work fine ( the PATH is correct ).

The problem is :
I have shell-scripts with the #! magic number.
I can't use #!perl even if my PATH is correct.
I can't use #! $HOME/local/IRIX5/bin because this shellscript won't work on an AIX system.
I can't use #! $PREFIX/bin/perl

Do you have any Idea ? Is there one solution ?

I don't want to put my local on /usr/local because the systems are 
often broken, reinitialized, ... They are test machines.



-- 
Serge Noiraud                     BULL S.A. France - BULL TeleService
mailto:Serge.Noiraud@bull.net     8 Bd Albert EINSTEIN  BP 72322
http://www.bull.com               44073 - Nantes CEDEX 3 FRANCE
http://www.bull.fr                Fax    : (33) 02 51 81 48 20


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

Date: Sat, 19 Sep 1998 01:54:19 -0400
From: "John Smith" <bgates@microsoft.com>
Subject: what's wrong with win32 perl ?
Message-Id: <6tvh4s$iks$1@winter.news.erols.com>

I still couldn't compile modules under win32.
So far, I have tried four different versions of perl5,
include ActiveState perl. They all complained about
xsubpp. Is it my windows setting or the unsolved problem of win32 perl ?
Please help.
If anybody have a binary version of HTML::Embperl
module, could you please email me ?
Thanks,
dc@fcc.gov





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

Date: Sat, 19 Sep 1998 05:57:43 GMT
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: where is Date::Parse?
Message-Id: <6tvh4d$bpc@flatland.dimensional.com>

Russ Allbery <rra@stanford.edu> writes:

> That was a singularly unuseful set of responses to this question.  Good
> grief.  It would be nice if people would try to be a little more helpful
> even if something looks like a FAQ.

I'll have to assume you didn't see my response, in which I gave the
poster two URLs where one could search for "Date::Parse" and find out
where it is (TimeDate).

If, on the other hand, you did see my post and considered it to be
unhelpful because it didn't contain The Answer, then all I can say is:

    Give a man a fish and he eats for a day.
    Teach a man to fish and he eats for a lifetime.

I consider teaching a man to fish a greater service than giving him a fish.

-- 
Michael Fuhr
http://www.fuhr.net/~mfuhr/


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

Date: 18 Sep 1998 23:41:29 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: where is Date::Parse?
Message-Id: <ylogscr4di.fsf@windlord.stanford.edu>

Michael Fuhr <mfuhr@dimensional.com> writes:

> I'll have to assume you didn't see my response, in which I gave the
> poster two URLs where one could search for "Date::Parse" and find out
> where it is (TimeDate).

In at least the CPAN URL, this piece of information is not at all obvious.
I've been using Perl for years, I have patches in Perl's core
distribution, I have modules on CPAN, and I *often* have difficulty
finding Date::Parse when I haven't looked for it for a while and forgot
where it was.

> If, on the other hand, you did see my post and considered it to be
> unhelpful because it didn't contain The Answer, then all I can say is:

>     Give a man a fish and he eats for a day.
>     Teach a man to fish and he eats for a lifetime.

You don't have to keep the man starving while you teach him to fish, you
know.  It doesn't help you teach him any better and tends to just make him
resentful of fishermen.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Sat, 19 Sep 1998 02:22:40 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: where is Date::Parse?
Message-Id: <36035BC0.EF2C792@gpu.srv.ualberta.ca>

Russ Allbery wrote:
!
[snip]

! distribution, I have modules on CPAN, and I *often* have difficulty
! finding Date::Parse when I haven't looked for it for a while and
! forgot where it was.
[snip]

! You don't have to keep the man starving while you teach him to fish,
! you know.  It doesn't help you teach him any better and tends to just
! make him resentful of fishermen.


let's go fishing:

[danger:ajohnson:~]$ perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.40)
ReadLine support enabled

cpan> m /Date::Parse/
CPAN: LWP loaded ok

[snip: fetching documents...]

Module id = Date::Parse
    DESCRIPTION  ASCII Date parser using regexp's
    CPAN_USERID  GBARR (Graham Barr <gbarr@pobox.com>)
    CPAN_VERSION 2.09
    CPAN_FILE    GBARR/TimeDate-1.08.tar.gz
    DSLI_STATUS  Rdpf (released,developer,perl,functions)
    MANPAGE      Date::Parse - Parse date strings into time values
    INST_FILE    /usr/local/lib/perl5/site_perl/5.005/Date/Parse.pm
    INST_VERSION 2.09


cpan> 

I hooked a fish <---- This Big! ----> 

cpan> install Date::Parse
Date::Parse is up to date.

oh yeah, already caught that one ...
:-)

regards
andrew


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

Date: 19 Sep 1998 00:32:45 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: where is Date::Parse?
Message-Id: <yld88sr202.fsf@windlord.stanford.edu>

Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> writes:

> let's go fishing:

> [danger:ajohnson:~]$ perl -MCPAN -e shell

Ew.

You have your tools, I have mine.  That's not one of mine.  I highly
dislike automated installation procedures, particularly ones that keep
their own databases and don't integrate well into the package management
schemes that I already have.  I suppose it rocks for people who like it;
I'm not one of those people.

Nonetheless, agreed, that's a reasonable way to search for a module.  :)

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Sat, 19 Sep 1998 02:55:05 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: where is Date::Parse?
Message-Id: <36036359.22A1CDE5@gpu.srv.ualberta.ca>

Russ Allbery wrote:
> 
> Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> writes:
> 
> > let's go fishing:
> 
> > [danger:ajohnson:~]$ perl -MCPAN -e shell
> 
> Ew.
> 
> You have your tools, I have mine.  That's not one of mine.  I highly
> dislike automated installation procedures, particularly ones that keep
> their own databases and don't integrate well into the package management
> schemes that I already have.  I suppose it rocks for people who like it;
> I'm not one of those people.
> 
> Nonetheless, agreed, that's a reasonable way to search for a module.  :)

personally, I'm generally a 'grab a tarball, unpack it, check it
out, make ...' kind of guy --- but that wouldn't prevent me from
using CPAN.pm to do a little fishing, ie:

cpan> m /date/
Module          CGI::Validate   (ZENIN/CGI-Validate-2.000.tar.gz)
Module          Date::CTime     (Contact Author Graham Barr <gbarr@pobox.com>)
Module          Date::Calc      (STBEY/Date-Calc-4.2.tar.gz)
Module          Date::Convert   (MORTY/DateConvert-0.14.tgz)
Module          Date::Format    (GBARR/TimeDate-1.08.tar.gz)
Module          Date::GetDate   (ANDK/Date-GetDate-2.02.tar.gz)
Module          Date::Interval  (KTORP/Interval.0.02.tar.gz)
Module          Date::Language  (GBARR/TimeDate-1.08.tar.gz)
Module          Date::Manip     (SBECK/DateManip-5.33.tar.gz)
Module          Date::Parse     (GBARR/TimeDate-1.08.tar.gz)
Module          Date::Time      (Contact Author Tim Bunce <Tim.Bunce@ig.co.uk>)
Module          DateTime::Precise (B/BZ/BZAJAC/DateTime-Precise-0.03.tar.gz)
Module          HTTP::Date      (GAAS/libwww-perl-5.36.tar.gz)
Module          Mail::Field::Date (GBARR/MailTools-1.11.tar.gz)
Module          Net::DNS::Update (MFUHR/Net-DNS-0.12.tar.gz)
Module          ParseDate       (MUIR/scripts/frogbak.tar.gz)
Module          SyslogScan::ParseDate (RHNELSON/SyslogScan-0.32.tar.gz)
Module          Time::ParseDate (MUIR/modules/Time-modules-98.081201.tar.gz)
Module          Time::Zone      (GBARR/TimeDate-1.08.tar.gz)
Module          Tk::Date        (SREZIC/Tk-Date-0.21.tar.gz)

CPAN.pm does rock, IMHO
regards
andrew


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

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

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