[6459] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 84 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 10 20:17:35 1997

Date: Mon, 10 Mar 97 17:00:22 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 10 Mar 1997     Volume: 8 Number: 84

Today's topics:
     (Q) HTTP.PL <jalciere@xyplex.com>
     /\b\*((\w+\s*){1,3}\**){2,}/ <usenet-tag@qz.little-neck.ny.us>
     Re: 10 commandments (was re: Which one is the best (pat < hansm@icgned.nl>
     Re: Alphabetical Order < hansm@icgned.nl>
     bizarre problem: any ideas <clive@bigfish.co.uk>
     Const.pm?  Where is module? (Ken Williams)
     Creating a structured email through perl <student01@on.bell.ca>
     Differnces between 5.001 dbm and 5.003 dbm? <vmg@novator.com>
     HELP: Perl newbie need some help <rioux@cam.org>
     How can I include another perl script within a perl scr <krisho@exabyte.com>
     Re: how to include all the modules in the search path (Honza Pazdziora)
     Re: How to spam - legitimately <twpierce+usenet@mail.bsd.uchicago.edu>
     Re: How to spam - legitimately (William R. Somsky)
     Re: is 'my' compile-time or run-time? (Jeffrey)
     Need FILE1 copied to FILE2 (minus the spaces, tabs, CR, (michael allen smith)
     Re: Perl & HTML complicatons <brinthl@ch.etn.com>
     PLEASE HELP! (Al Medur)
     Re: PLEASE HELP! (Paco Hope)
     Re: Please Respond <ltorres@campus.ruv.itesm.mx>
     Re: Recurrence of variable, pct and count (Carl Payne)
     Say hi to the punk <ltorres@campus.ruv.itesm.mx>
     Re: simple new question! (KF6IIU)
     Re: simple new question! (Jeffrey)
     Re: simple tutorial on writing perl cgi for NT <kistlerp@ezinfo.ethz.ch>
     Re: Which version of Perl do I have? (Tom Limoncelli)
     Re: Who makes more $$ - Windows vs. Unix programmers? (Frithiof Jensen)
     Re: Why can't I subscript split? (Andrew M. Langmead)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 10 Mar 1997 16:31:00 -0500
From: John Alciere <jalciere@xyplex.com>
Subject: (Q) HTTP.PL
Message-Id: <33247D94.5843@xyplex.com>

We are thinking of using perl to automate testing of an html/http-based
user interface.  Has anyone had experience doing this?  Is there such a
thing as "http.pl" -- or are there other perl libraries that will be
useful for this application?

Thanks in advance.  Please respond directly, if possible.

John Alciere
Xyplex Networks
Littleton, MA

<jalciere@xyplex.com>


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

Date: 10 Mar 1997 23:00:10 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: /\b\*((\w+\s*){1,3}\**){2,}/
Message-Id: <5g23pq$21$1@news.netusa.net>


Can someone help me understand why this RE:

	/\b\*((\w+\s*){1,3}\**){2,}/

doesn't match this line:

	**this is junk**this is junk**this is junk**

Is the {1,3} trying to match the same word one to three times?

Elijah
------
reposting because he doesn't think this got out


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

Date: 11 Mar 1997 00:56:29 GMT
From: Hans Mulder< hansm@icgned.nl>
Subject: Re: 10 commandments (was re: Which one is the best (pattern matching))
Message-Id: <5g2ajt$1pt@news.euro.net>

Jeff Stampes wrote:
> the ten commandments:

> 9) Thou shall check return stati of functions

*All* functions?

Even print?

-- HansM


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

Date: 11 Mar 1997 00:16:47 GMT
From: Hans Mulder< hansm@icgned.nl>
Subject: Re: Alphabetical Order
Message-Id: <5g289f$1pt@news.euro.net>

"G.Cheers" <mau006@bangor.ac.uk> wrote:
>NOTE: PERL NEWBE
>
>Ok, I know what I want to do, I just don't know how to do it. I have
>customised a number of free-for-all links scripts in Perl which takes
>form input and posts it into a html doc. What I want to do is display
>the links in alphabetical order. Sorting the initials would suffice.

In perl it's easier to do proper alphabetical sorting than to sort
initials only.  Alphabetical sorting is done with an operator named
"sort" (who whould have guessed that?):

	@sorted_list = sort @original_list;

To sort initial letters only:

	@not_quite_sorted_list =
		sort {substr($a,0,1} cmp substr($b,0,1}} @original_list;

>I mean all beginning with A then B, rather than Aa, Ab then Ac etc. Rather
>than use a database approach I thought I would just comment the html:

>newlink-a, newlink-b, newlink-c etc.

>If my logic is wrong, and I should be thinking differently please let
>me know, but if someone can tell me how to translate the following, I
>could probably put something vaguely efficient together.

>if contents of $sitename have initial letter = "a"
>^^^^^^^^^^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^
>   can do this bit!        can't do this bit!

	if ($sitename =~ /^a/) {

But frankly, you'll have to work quite hard to write something
which is only 10 times slower than using the "sort" operator.

>also, should I be using 'otherwise'?

No.

>Any help or advice appreciated, Thanks

Buy the Llama book (ISBN 1-56592-042-2)

When you've finished reading it, buy the Camel book (1-56592-149-6)

Hope this helps,

-- HansM


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

Date: Mon, 10 Mar 1997 22:03:20 +0000
From: Clive Holloway <clive@bigfish.co.uk>
Subject: bizarre problem: any ideas
Message-Id: <33248527.F88@bigfish.co.uk>

I have a script that works when run from the command line.

When I run it from Netscape, through Win HTTPD server (win 3.1) I get
everything up to an 'open(FILEHANDLE,">filename.dat");'

Is it me being a newbie, or a config problem on win HTTPD? If anyone can
help, please mail me!!

code sample where it falls apart:

open(POSTCODES,"<p_codes.dat") || die ("Can't open postcode data
file!");

#find match

while ($line = <POSTCODES>) {
chomp $line;
@codes=split(",",$line);
last if ($codes[0] eq $prefix);
}
close(POSTCODES);

If it didn't work at the command line, I wouldn't be so bluddy
frustrated!!!

Ah well...

Clive ;-)
-- 

big fish web design     Tel: +44 (0)15395 64580   pager: 0336 778419
21-23 Park Road         Fax: +44 (0)15395 63487
Milnthorpe              To do is to be
Cumbria                 To be is to do
LA7 7AD   UK            Do be do be do


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

Date: Mon, 10 Mar 1997 14:55:48 -0500
From: ken@forum.swarthmore.edu (Ken Williams)
Subject: Const.pm?  Where is module?
Message-Id: <ken-1003971455480001@news.swarthmore.edu>

I found the following mention of a 'Const' module in an old article by
Tom.  But looking through CPAN, I find no such module.  What has happened
to it?  If it's gone, what's the current method of using un-alterable
variables?  What I want is to declare some global configuration
information at the beginning of a long program, and have that information
un-changeable for the rest of the program.  

I'm not particularly fond of the subroutine method, i.e. sub pi {3.1415}. 
And creating a reference to a scalar (i.e. $pi = \3.1415) isn't very
helpful, because you have to dereference it to get the value, and when you
do that you could accidentally assign to it.

Anyway, if someone can help me either find the Const.pm module, or the
other one that Tom talks about below, I would appreciate it greatly! 
Thanks.


>:In article <GUTTMAN.95Jun21174028@guernsey.bedford.progress.com>,
>:Uri Guttman <guttman@bedford.progress.com> wrote:
>:: 
>:: while musing on the thread on perl macros, i feel thay are not useful. but
>:: constants might be worth looking into. i even have a plausible syntax.
>:: .....
>
>There are at least two modules out there that already do this. 
>I use one of them a bit.
>
>     1      use Const;
>     2      const $x = 1;
>     3      print $x;
>     4      $x += 3;
>     5      print $x;
>
>That will raise an exception at line 4.
>
>--tom
>
>-- 
>Tom Christiansen      Perl Consultant, Gamer, Hiker      tchrist@mox.perl.com


-Ken Williams
 ken@forum.swarthmore.edu


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

Date: Mon, 10 Mar 1997 21:55:20 GMT
From: Matt Park <student01@on.bell.ca>
Subject: Creating a structured email through perl
Message-Id: <33248348.758B@on.bell.ca>

Hello,

Let me begin by saying that I am a beginner at the world of perl.
 
Is it possible to design a cgi script in perl that will process the
information contained in an HTML form.  By "process" I mean taking each
of the form element values, placing them into a standard email, and
mailing the finished product to a designated recipient.  I tried to use
the mailto: action & enctype: text/plain.  I am sure you are aware this
simply displays the name/value for each element in the form.  I was
under the impression a cgi script would be able to help.  Any
information would be useful, the more detailed the better.

Thanks

Matt


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

Date: Mon, 10 Mar 1997 18:24:52 -0400
From: Victor Granic <vmg@novator.com>
Subject: Differnces between 5.001 dbm and 5.003 dbm?
Message-Id: <33248A34.14CD@novator.com>

Recently installed 5.003 and now none of my scripts that
manipulate dbm files work.  The frustrating thing is that
there are no errors being produced.  Are there known 
incompatibilities between these versions or the way that
they open dbm files?

Thanks, 
Victor Granic
vmg@novator.com


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

Date: Mon, 10 Mar 1997 18:35:39 -0500
From: Jean-Christophe Rioux <rioux@cam.org>
Subject: HELP: Perl newbie need some help
Message-Id: <33249ACB.69CD@cam.org>

(P.S. SORRY FOR THE ENGLISH, I'M FRENCH SPEAKING)

I have a question to ask you...

I want to delete text that is between two tag like in this exemple:

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

<html><head><title>holo</title></head><body background="marble.jpg">
<table><table border=0 cellspacing=0 cellpadding=0>

<!--begin-->
<!--mme122-->
<tr><td><font size=-1>&nbsp&nbsp<A
href="/home/mylogin/public_html/test/sci_holo/message/me122.html"
target="articles"><b>3</a>&nbsp&nbsp</font></td><td><font
size=-1>&nbsp&nbsp;lk&nbsp&nbsp</font></td><td><font size=-1>&nbsp&nbsp
Mar  6 1997 </b></FONT></A></td></tr>
<!--fmme122-->
<!--mme121-->
<tr><td><font size=-1>&nbsp&nbsp<A
href="/home/mylogin/public_html/test/sci_holo/message/me121.html"
target="articles"><b>2</a>&nbsp&nbsp</font></td><td><font
size=-1>&nbsp&nbsp;lk&nbsp&nbsp</font></td><td><font size=-1>&nbsp&nbsp
Mar  6 1997 </b></FONT></A></td></tr>
<!--fmme121-->
<!--mme120-->
<tr><td><font size=-1>&nbsp&nbsp<A
href="/home/mylogin/public_html/test/sci_holo/message/me120.html"
target="articles"><b>1</a>&nbsp&nbsp</font></td><td><font
size=-1>&nbsp&nbsp;lk&nbsp&nbsp</font></td><td><font size=-1>&nbsp&nbsp
Mar  6 1997 </b></FONT></A></td></tr>
<!--fmme120-->

</table></body></html>

------------------------
I want to delete the text between the <!--mme###--> and <!--fmme###-->
and delete the two tag in the same time...

(Important: note that the <!--mme###--> or <!--fmme###--> are not on the
same line as the text!!!)

I try this script but is realy dont work:

-------------------------
#!/usr/bin/perl

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$value =~ s/<([^>]|\n)*>//g;
$FORM{$name} = $value;}

$index= "../indexsuj.html";
$/ =1;
open (FILE,"$index");
$data=<FILE>;
$data =~ s/<!--mme$FORM{'ID'}-->.+?<!--fmme$FORM{'ID'}-->//mg;
close(FILE);
open (OUTFILE,">$index") ;
print OUTFILE $data;
close (OUTFILE);
print "Content-type: text/html\n\n";
print "<html><head></head><body>Deleting is complete</body></html>\n";

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

I'm not a "pro" in PERL5 so please be very CLEAR in your explanation...

Thanks in advance for your help form all the the guy who are waitiing
for this cgi and who want to see me dead,

Jean-Christophe Rioux


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

Date: Mon, 10 Mar 1997 15:13:00 -0700
From: Kris Houghton <krisho@exabyte.com>
Subject: How can I include another perl script within a perl script ??? Help
Message-Id: <3324876C.2233@exabyte.com>

In the korn shell you can use a . include file but how is this done in perl.

script1
 !#  /usr/local/bin/perl
 print "help";
 exit

script2
 !# /usr/local/bin/perl
 
  # How can I use the stuff in perl script1 in perl script2.

  use        ???
  require    ???
  &script1   ???
  include    ???

 If anyone has any examples or documentaion please respond.


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

Date: Mon, 10 Mar 1997 19:57:51 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: how to include all the modules in the search path
Message-Id: <adelton.858023871@aisa.fi.muni.cz>

Jason Hsi Wu <jwu@g-net.net> writes:

> Hello perl programmers:
> 
> I am new to Perl.
> I have written a script that has "require" to use other library. When I
> ran it, it says it can't find the required library.
> 
> I am sure I have to set some kind of path. Can someone tell me what
> Pathname has to be set?? (I tried LD_LIBRARY_PATH, and it didn't work)

Library in perl is not the library loaded by the system, it's the
module loaded by perl. So you use PERL5LIB or PERLLIB.

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Mon, 10 Mar 1997 21:56:15 GMT
From: Tim Pierce <twpierce+usenet@mail.bsd.uchicago.edu>
Subject: Re: How to spam - legitimately
Message-Id: <E6uKxs.9KJ@midway.uchicago.edu>

In article <3322fa0d.470163687@news2.aimnet.com>,
Terry Carroll <carroll@tjc.com> wrote:

>The point is, well-educated native speakers of English are going around
>saying "send me an email," and "I got your email," etc.

Ah, ah, ah: what has been established is that native speakers of
English are saying these things.  The rest is yet to be
determined.

Besides, what's wrong with ``I got your email?''  That sounds just
fine, even to a relative purist.  It sounds to me like you just
haven't been paying much attention.

-- 
Support the Hawaii Equal Rights Marriage Project: call 1-900-97-MARRY ($5/call)


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

Date: 10 Mar 1997 20:54:46 GMT
From: somsky@dirac.phys.washington.edu (William R. Somsky)
Subject: Re: How to spam - legitimately
Message-Id: <5g1sem$j9b@nntp1.u.washington.edu>

In article <3322fa0d.470163687@news2.aimnet.com>,
Terry Carroll <carroll@tjc.com> wrote:

> And it sounds fine to my native ears, and to the native ears of a lot of
> other people.  My point was that the "I've never heard a native speaker
> use it" slam is more probative of the slammer's limited circle than
> anything else.

Just because _you_ hear people about you using "an email", while others
report that they don't know of anybody that uses that term doesn't mean
that they have any more of a limited circle than you do.  It may very
well be a regional/occupational/dialectical thing.  I mean, do you cook
your eggs in a "frying pan" or a "skillet"?  Do you and the people
around you drink "soda" or "pop"?  Or perhaps you're from the south,
where I'm told you can order an "orange coke" and be assured of getting
a normal orange-flavored soda-pop rather than some odd concoction of
Coca-Cola and orange juice or strange stares.

> [...] and it is an advancement, because it supplies a word where no
> word previously existed.

> What I see you articulating is the unwarranted assumption that, since
> "email" derives from "mail," the former inherits all of the attributes of
> the latter.  But quite simply, that's not how language works.

But just because the construction "an email" supplies a word where no
word previously existed doesn't mean it is/should be/will become standard
either.  That's not how language works either.  Not all neologisms
become accepted.  "An eletter" was mentioned and _nobody_ seems to like
that.  It does supply an word where there was no generally accepted word
before, but it seems the consesus here to reject it out of hard as "awkward".

> The point is, well-educated native speakers of English are going around
> saying "send me an email," and "I got your email," etc.  It's pretty much
> standard, [...]

And there are also well-educated, native speakers of English who are _not_
going around saying "send me an email", and "I got your email", etc.,
and who cringe when they hear it.  It's _not_ standard -- at least not
yet.  It _may_ become standard, but then again, it may die.  It's still
in the "experimental" phase, as far as I can tell, and the dissention
among people in these groups and the length of the discussion thread
should be enough to indicate that it is not yet a settled issue.

English is an _evolving_ language.  And that means that some new words
and usages may become standard even though some people don't like them
and don't use them.  So "an email" _may_ become the standard, even
though some people object to it.  But evolution implies selection, and
that means that some new words and usages will _not_ become standard
even though some people do like them and do use them.  So "an email"
may "die a-borning" even though you and other are in favor of it.

________________________________________________________________________
Dr. William R. Somsky			      somsky@phys.washington.edu
Department of Physics, Box 351560		 B432 Physics-Astro Bldg
Univ. of Washington, Seattle WA 98195-1560		    206/616-2954


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

Date: 10 Mar 1997 18:25:18 GMT
From: jfriedl@tubby.nff.ncl.omron.co.jp (Jeffrey)
To: Dave@Thomases.com
Subject: Re: is 'my' compile-time or run-time?
Message-Id: <JFRIEDL.97Mar11032518@tubby.nff.ncl.omron.co.jp>


[mail and post]

Dave Thomas <dave@fast.thomases.com> wrote:
|> > If 'my' were compile time, it wouldn't allow two my's in the same block.
|> > The compiler does generate a warning, but accepts it. The second my
|> > hides the first. (I could retrive the value of the first one by keeping
|> > a reference). Does this mean that if I put my in a loop, it will keep on
|> > allocating new space for it?

If it's in a loop, then the loop's block is exited each time the test is
reevaluated, so the 'my' variables dissappear with each iteration.
So no, you don't have to worry about it space-wise.

The internal bookkeeping needed when first accessing a new 'my' variable,
however, does cost you something in time. Something like
	  my $var;
	  while (some test) {
                 ... use $var ...
          }

will be faster than

	  while (some test) {
 	         my $var;
                 ... use $var ...
          }

by some small amount (I ran some benchmarks and found the overhead of
the 'my' to be about the same as that of a single variable assignment,
so if the block has a lot happening, it won't matter all that much).

The semantics are very different, of course, but if the algorithm and
readability allow you to take the 'my' out of the loop, you can win a bit
by doing so.

	Jeffrey
----------------------------------------------------------------------------
Jeffrey Friedl <jfriedl@ora.com> Omron Corp, Nagaokakyo, Kyoto 617 Japan
See my Jap<->Eng dictionary at http://www.wg.omron.co.jp/cgi-bin/j-e
O'Reilly's Regular Expression book: http://enterprise.ic.gc.ca/~jfriedl/regex/



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

Date: Mon, 10 Mar 1997 22:38:50 GMT
From: mas@cyberspy.com (michael allen smith)
Subject: Need FILE1 copied to FILE2 (minus the spaces, tabs, CR, or any other invisible characters)
Message-Id: <33248b3c.181198528@news.cyberspy.com>

This is my 1st day using PERL and my goal is remove all spaces, tabs,
and line feeds from a DATA file.  I've played with the ~ s and have
been able to remove spaces, tabs, and some CR, but not without
corrupting the data.  Is PERL the right choice for the job?       

thanks,
mas


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

Date: 10 Mar 1997 23:18:21 GMT
From: "Lee Brinton" <brinthl@ch.etn.com>
Subject: Re: Perl & HTML complicatons
Message-Id: <01bc2da9$fadf6a80$e71163a6@brinthl.bid.ch.etn.com>

You need to use double quotes instead of single quotes in order for your
variables to be interpolated.  You will also have to escape the double
quotes that
are currently in the strings.

Christopher M. Surber <surber@earthlink.net> wrote in article
<331D2BD7.3D44@earthlink.net>...
> yes yes its more perl questions;
> here goes:
> 
> as the script is read by perl it is reading the "HTML" code and
> confusing it with the perl code, ive tyied to escape the html  in
> different ways but to not much avail, the code i have so far is ...
 
> the $variables are not gitting inserted into the output, and the "\n" is
> being inserted in between each frame.



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

Date: Tue, 11 Mar 1997 01:26:55 GMT
From: medal44@ix.netcom.com (Al Medur)
Subject: PLEASE HELP!
Message-Id: <3324b32f.37815988@nntp.netcruiser>

Hi, I am new with all of this...

I downloaded a perl cgi script for a chat  room. However, I would love
to change a few things...

A) when a user posts a message, they must fill in a "name" field to
determine what the "name" will be in the chat room. Howver, after
posting a message, the name field is still there for the nest message.
I was hoping I could change it so that rather than the field, the
original name selected stays...

B) I would like for certain name inputs to equal graphics. Say, for
instance, i type in "bigdave" as my name. when ever someone logs into
the chat as "bigdave" rather than there message appearing as...

bigdave from ix.netcom.com at 7:30pm EST

hello everyone!

rather than that, there would be a gaphic for the use. say some little
icon that says bigdave and has a picture of a baseball on it or
something. the, it would appear as...

(graphic here) from ix.netcom.com at 7:30pm EST

hello everyone!

I know in the basic language, it would be an easy IF THEN statement,
such as this...

IF name$ = "bigdave" THEN name$ = "<img src="bigdave.gif">"

I just don't know what this would be in PERL. Thanks alot to those
kind enough to help me out!
 - medal44@ix.netcom.com




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

Date: Tue, 11 Mar 1997 00:10:36 GMT
From: bah6f@cs.virginia.edu (Paco Hope)
To: micke@cel95mhl.campus.mdh.se (Mikael Hallendal)
Subject: Re: PLEASE HELP!
Message-Id: <5g27ts$46l@jazz.cs.Virginia.EDU>


Mikael Hallendal writes:
> I need help using print() to print colors in an color_xterm.
> Say for exampel that I want to print 'Hi' in red what's the syntax.

Look at the Term::ANSIColor package.  It is young, but it is probably
good enough to do what you want.

Any CPAN archive has it.  I use:
ftp://uiarchive.cso.uiuc.edu/pub/lang/perl/CPAN/modules/by-module/Term

Paco
-- 
Paco Hope                                         Computer Systems Engineer
paco@cs.virginia.edu                         Department of Computer Science
http://www.cs.virginia.edu/~bah6f/                   University of Virginia


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

Date: Mon, 10 Mar 1997 17:24:21 -0600
From: Luis Torres <ltorres@campus.ruv.itesm.mx>
Subject: Re: Please Respond
Message-Id: <33249825.43E@campus.ruv.itesm.mx>

A. Deckers wrote:
> 
> In <33186BD7.1FD5@ix.netcom.com>,
>         Scott Green <mogreen@ix.netcom.com> wrote:
> >Subject: Please Respond
> 
> That's a seriously sucky subject line. It tells readers *nothing* about
> the subject of your enquiry and is likely to put some people off reading


Give an answer boy... dont just complain...


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

Date: 10 Mar 1997 15:53:32 -0700
From: cpayne@xmission.xmission.com (Carl Payne)
Subject: Re: Recurrence of variable, pct and count
Message-Id: <5g23dc$1td$1@xmission.xmission.com>

In comp.lang.perl.misc Nathan V. Patwardhan <nvp@shore.net> wrote:

> Yes, please trust your employees, unless you have a reasonable belief
> that they are stealing from you.  Why do you have everything in the
> office generating security reports, anyways?  Including the fridge?
> What's a jolt fridge?  For jolt cola?  Not a flame, but your note 
> sounds a wee bit paranoid.  :-)

OK, Nathan, just for you:

I have a data file.  The contents and details of this file
I am legally bound NOT to disclose ANY of.  This file has very...
how you say...unusual recording...er...methodology.  It does
not use typical english / awk / perl / sed / tabulature format,
but that's irrelevant.

I created an example that I can refer to with English words, the
perl routine I can modify to do the non-English stuff, and the
results will come out how I want.  I just ewanted to get the
thoughts on "paper" so everyone could understand what I was referring
to without some of the stuff I've seen on clpm, like:

"...if g%ds(3)/34 <=938$somesuch, how can I get the fourth digit of the
second collumn when divisible by a prime number no carry into a
variable that remains less than the sum of the digits in the
fourth collumn of the second field?"

OK?  Don't get paranoid.  I am not big brother.  I *SIT* on Big
Brother until he gives me his @#$%& ice cream.  I just don't feel like
explaining why I have to do things the exact way I describe when
there's "such an easier way if you just use suchandsuch..."


Carl

-- 

	Opportunity only knocks once
	In my case, it also leaves a flaming bag of dog crap on the porch


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

Date: Mon, 10 Mar 1997 17:17:13 -0600
From: Luis Torres <ltorres@campus.ruv.itesm.mx>
Subject: Say hi to the punk
Message-Id: <33249679.868@campus.ruv.itesm.mx>

This punk is a self centered idiot who doesnt understand the concept of
helping people...


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

Date: Mon, 10 Mar 1997 18:04:44 GMT
From: spammers@must.die.com (KF6IIU)
Subject: Re: simple new question!
Message-Id: <wsandersE6uA7w.EC2@netcom.com>

>:    $true = 1;
>:    $false = 0;
>:    $abc = $false; # or whatever, to start with
>
>Bad idea.  Get used to 0 and '' being false, all else being true.

I agree. But with sh, csh, ksh, perl, C, Fortran, C++, morse code, the
kichen sink, and everything else sloshing about in my brain, I sometimes
find myself writing:

$true = (1 == 1);
$false = (1 != 1);

This usually appears in scripts written before noon on a Monday.

I think I picked this bad habit up in the 70s when there were some
versons of Fortran that defined truth differently. (A lot of people
picked up some bad stuff during the 70s.)

>    "It is easier to port a shell than a shell script."
>		--Larry Wall

I think the above quote says it all,

-w


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

Date: 10 Mar 1997 17:54:38 GMT
From: jfriedl@tubby.nff.ncl.omron.co.jp (Jeffrey)
To: tchrist@mox.perl.com (Tom Christiansen)
Subject: Re: simple new question!
Message-Id: <JFRIEDL.97Mar11025438@tubby.nff.ncl.omron.co.jp>


[mail and post]

Tom Christiansen <tchrist@mox.perl.com> wrote:
|> Bad idea.  Get used to 0 and '' being false, all else being true.

 ... for values of "all else" that don't include undef. :-)

	Jeffrey
----------------------------------------------------------------------------
Jeffrey Friedl <jfriedl@ora.com> Omron Corp, Nagaokakyo, Kyoto 617 Japan
See my Jap<->Eng dictionary at http://www.wg.omron.co.jp/cgi-bin/j-e
O'Reilly's Regular Expression book: http://enterprise.ic.gc.ca/~jfriedl/regex/


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

Date: Mon, 10 Mar 1997 22:35:54 +0100
From: Per Kistler <kistlerp@ezinfo.ethz.ch>
To: Webfirst <webfirst@intr.net>
Subject: Re: simple tutorial on writing perl cgi for NT
Message-Id: <33247EBA.1CFB@ezinfo.ethz.ch>

Hi

Although this group is not about cgi....
Start cgi scripts like:

#!/usr/bin/perl
print <<"EOF";
Content-Type: text/html
                              <<<<< this empty line is necessary!
<html>
<head>
<title>mytitle</title>
</head>
<body>
EOF
Then only comes your code:
print "Hello, World!\n"; # and more code
end end it with:
print <<"EOF";
</body>
</html>
EOF

Bye, Per.
-- 
Per Kistler, Zuerich, Switzerland. (Unix/Perl/C++)
>>>>>>>>>>>>kistlerp@ezinfo.ethz.ch<<<<<<<<<<<<<
----------------------------------------------------------------------


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

Date: 10 Mar 1997 08:58:11 -0500
From: tal@plts.org (Tom Limoncelli)
Subject: Re: Which version of Perl do I have?
Message-Id: <5g141j$bps@plts.org>

In <5fvqf1$87k$1@csnews.cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:

>In comp.lang.perl.misc, Anirvan Chatterjee <anirvan@crl.com> wrote
>one line of new data and twenty-one lines of gunk.  This is simply silly.
>Please be more reasonable.

If he hadn't PGP-signed it, it would have only been a couple lines.  Of
course, if he hadn't PGP-signed it, we might not have been sure that
he really said what amounts to "RTFM".
-- 
                                Tom Limoncelli
   tal@bell-labs.com -- http://mars.superlink.net/user/tal --  tal@plts.org

   "You can not solve the problem of people being annoying with technology."


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

Date: 10 Mar 1997 22:37:49 GMT
From: Frithiof.Jensen@jet.uk (Frithiof Jensen)
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <5g22ft$h2s@postman.jet.uk>

In article <karma-0903971231120001@ip053.mu3.nwlink.com>, karma@nwlink.com (Karma) says:
>

>Definitely, Windows!!! Though, I would focus on support rather than
>software development. Since there are various flavours of Windows (3.1,
>9x, NT x.x) and umpteen number of incompatible hardware designs, this adds
>up to a myriad combinations of possible mismatches, you can spend all the
>24-hours in a day fixing one machine or the other.

Ah yes, but JAVA is going to kill that cirkus dead.

British Telecom estimates that more than 50% of the workstations in a typical
enterprise will be NC machines by year 1998! (The Guardian, 3 march 1997).






===============================================================================
    The above article is the personal view of the poster and should not be
       considered as an official comment from the JET Joint Undertaking
===============================================================================


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

Date: Mon, 10 Mar 1997 20:00:03 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Why can't I subscript split?
Message-Id: <E6uFK3.LH5@world.std.com>

kodis@kodis.jagunet.com (John Kodis) writes:

>I'm trying to extract and operate on one field in a line.  It seems
>that since split yields an array, and since an array can be
>dereferenced to yield an array element, that I should be able to do
>something along the lines of...

>    sort { $split(':',$a)[4] cmp $split(':',$b)[4] } @passwd;

You can subscript a list, but you can't subscript a function call. You
can, however, put the result of a function call into a list, which can
then be subscripted.

   (split ':', $a)[4]

But you can sort it much quicker if you split the field out once,
before you sort, and use that pre-processed data as the basis of your
sort:
 
foreach $entry (@passwd) {
  push @gcos, (split ':', $entry)[4];
}


print @passwd[ sort { $gcos[$a] cmp $gcos[$b] } 0 .. $#passwd ];


or more compactly as:

print map { $_->[0] } sort {
          $a->[1] cmp $b->[1]
      } map { [ $_ => (split ':', $_)[4] ] } @passwd;

See Far More Than Everything You Ever Wanted to Know About Sorting
<http://www.perl.com/CPAN/doc/FMTEYEWTK/sorting.html> for details.
-- 
Andrew Langmead


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 84
************************************

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