[9638] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3232 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 23 11:17:09 1998

Date: Thu, 23 Jul 98 08:00:47 -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, 23 Jul 1998     Volume: 8 Number: 3232

Today's topics:
    Re: comparing files in perl (Mark-Jason Dominus)
    Re: delete while iterating over array <quednauf@nortel.co.uk>
    Re: delete while iterating over array (Larry Rosler)
    Re: Dynamically creating graph images projectmaster@mscl.com
        Expanding $1 in a variable substitution <rseals@fore.com>
    Re: Expanding $1 in a variable substitution <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: File File Creation date (Larry Rosler)
    Re: File::Find Symlink Problem <John.Adams@BentonvilleAR.ncr.com>
    Re: File::Find Symlink Problem <tchrist@mox.perl.com>
    Re: format report blank line in output <Eric.Zylberstejn@wanadoo.com>
    Re: Hash tree problems. (Mark-Jason Dominus)
    Re: Hash tree problems. <tchrist@mox.perl.com>
        How many times... <lyonsd@atl.hp.com>
    Re: installing perl in a different directory, @INC <Eric.Zylberstejn@wanadoo.com>
    Re: Is Perl y2k compliant? huntersean@my-dejanews.com
    Re: Is Perl y2k compliant? huntersean@my-dejanews.com
        local %ENV buggy with open boubaker@dgac.fr
        Multiple Key Sort <bachovch@dev.upenn.edu>
    Re: Multiple Key Sort <Eric.Zylberstejn@wanadoo.com>
    Re: Multiple Key Sort <quednauf@nortel.co.uk>
    Re: Multiple Key Sort <quednauf@nortel.co.uk>
    Re: need some info about perl <perlguy@inlink.com>
    Re: need some info about perl <file@job.to>
    Re: Newbie question: a script that ALMOST works (using  <ddallasnc@worldnet.att.net>
    Re: novice Q; reading columns of numbers <jdporter@min.net>
    Re: OT? Fly GIF's <Eric.Zylberstejn@wanadoo.com>
    Re: Perl array name <tchrist@mox.perl.com>
    Re: Perl array name john_dawson@my-dejanews.com
    Re: Perl Beautifier Home Page <jdporter@min.net>
    Re: Perl Beautifier Home Page <jdporter@min.net>
        problem with NS cookies <leduc@kazibao.net>
        Problem with Perl on AIX <g.klein@mail.lvr.de>
    Re: Reading in a txt file to an associative array - Beg <jdporter@min.net>
    Re: References as strings <qdtcall@esb.ericsson.se>
    Re: References as strings <quednauf@nortel.co.uk>
    Re: regexp question <maraism@sterlingdi.com>
    Re: STUMPED!!! (perl trivia) ("Advent Dtp")
    Re: STUMPED!!! (perl trivia) (Mark-Jason Dominus)
    Re: STUMPED!!! (perl trivia) ("Advent Dtp")
    Re: STUMPED!!! (perl trivia) (Mark-Jason Dominus)
    Re: system() return values voonh@my-dejanews.com
        To STRICT for me ! <jwagner@digilog.de>
    Re: What's wrong? <jdporter@min.net>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 23 Jul 1998 08:56:02 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: comparing files in perl
Message-Id: <6p7bt2$lk6$1@monet.op.net>


In article <35B6C154.4A6B341@morpheme.com>,
Lenny Bruce Lee  <lloyd@morpheme.com> wrote:
>Anyone who is interested in working on this, I have an algorithm I
>have written comparing two files. It is not smart and elegant like
>like diff though. 

I once read an article written by the authors of `diff'; they said
that they hard worked very hard on the algorithm until they found the
right one.

I think what they ended up using (and I hope someone will correct me,
because I om not very confident about this) was the `longest common
subsequence' method.  in the LCS problem, you have two sequences of
items:

	a b c d f g h j q z

	a b c d e f g i j k r x y z

and you want to find the longest sequence of items that is present in
both original sequences in the same order.  That is, you want to find
a new sequence S which can be obtained from the first sequence by
deleting some items, and from the secend sequence by deleting other
items.  You also want S to be as long as possible.  In this case S is

	a b c d f g j z

>From there it's only a small step to get diff-like output:

	e   h i   k   q r x y 
	+   - +   +   - + + +

So then the question is how to solve the LCS problem, and it turns out
that a fairly straightforward dynamic programming approach works well.
If you do web a search for "longest common subsequence" and "dynamic
programming" you'll get good results.  I found a reasonable reference
at http://www.ics.uci.edu/~eppstein/161/960229.html if you want to
look at that.  Briefly, you write a recursive function to compute the
LCS of two sequences, and it works like this:

	If either of S1 and S2 is empty, the LCS is empty.

	If S1 and S2 begin with the same symbol, like (x T1) and (x T2),
	then the longest common subsequence must start with x, and the
	rest of the LCS is the LCS of T1 and T2, which is simpler.
	Similarly if they end with the same symbol.

	If S1 and S2 begin with different characters, like (x T1) and
	(y T2), then at least one of x or y will be omitted from the
	LCS.  So compute both of LCS(T1, S2) and LCS(S1, T2) and take
	whichever turns out to be longest.

This function will be very, very slow, because it makes many recursive
calls.  But you can make it much faster by memoizing it; memoizing
means that you make the function use a cache to remember the values it
has computed before, and if it gets the same arguments a second time,
it just returns the previously computed value out of the cache instead
of computing it all over again.  There's a CPAN `Memoize' module that
does this automatically; to use it you'd just say

	use Memoize;
	memoize 'LCS';

	sub LCS { 
	   ...
	}

Hope this helps.





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

Date: Thu, 23 Jul 1998 13:14:43 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: delete while iterating over array
Message-Id: <35B72933.91DEAFD0@nortel.co.uk>

dwiesel@my-dejanews.com wrote:
> 
> Hi,
> 
> I have an array where some keys are empty ( "" ). How do I do to delete them?
> I understand that I can't use splice when iterating over the array.
> 
> Any suggestions?

In the great spirit of TIMTOWTDI...

@array = grep {$_} @array;

Why? If element is not defined, it returns false, and the element is not
taken.

-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Thu, 23 Jul 1998 07:01:19 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: delete while iterating over array
Message-Id: <MPG.1020e20a68a4a8f298977b@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc; copy mailed to F.Quednau 
<quednauf@nortel.co.uk>.]

In article <35B72933.91DEAFD0@nortel.co.uk> on Thu, 23 Jul 1998 13:14:43 
+0100, F.Quednau <quednauf@nortel.co.uk> says...
> dwiesel@my-dejanews.com wrote:
> > 
> > Hi,
> > 
> > I have an array where some keys are empty ( "" ). How do I do to delete them?
> > I understand that I can't use splice when iterating over the array.
> > 
> > Any suggestions?
> 
> In the great spirit of TIMTOWTDI...
> 
> @array = grep {$_} @array;
> 
> Why? If element is not defined, it returns false, and the element is not
> taken.

Gah!!!  What if it is defined but false (0)?  I prefer this one of the 
Many Ways:

@array = grep length, @array;

which eliminates the specified empty ( "" ) elements.  To prevent 
warnings if there are undefined elements also, use:

@array = grep defined($_) && length, @array;

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


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

Date: Wed, 22 Jul 1998 14:28:01 GMT
From: projectmaster@mscl.com
Subject: Re: Dynamically creating graph images
Message-Id: <6p7h15$pmb$1@news0-alterdial.uu.net>

In article <6p58fu$26b$1@ultranews.duc.auburn.edu>, carltjm@mail.auburn.edu 
(Joseph M Carlton) wrote:
>I am using perl to fetch data from a database for a web project that I am 
>working on. Now, I need to dynamically build a bar graph with this data.  
>Someone told me that I could use javascript and somebody told me that I 
>could do the whole thing in perl. I have not been able to find any 
>information on this topic for either javascript or perl.  Could someone 
>PLEASE direct me to a book or web page with information on this?  I am 
>not limited to perl and javascript, so if anyone knows of a better way to 
>do this.  I would be VERY appreciative.  Thanks in advance for your help.
>

The August issue of Linux Journal has a great story on doing just that with 
gnuplot and perl. Really straitforward and easy to use.

Mike Glenn
mglenn@zbzoom.net


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

Date: Thu, 23 Jul 1998 09:41:17 -0400
From: Robert Seals <rseals@fore.com>
Subject: Expanding $1 in a variable substitution
Message-Id: <35B73D7D.E9B295EA@fore.com>

I really have looked for the answer all over the place!

#!/usr/local/bin/perl -w
$m = "abc(.*)m";
$r = '$1$1$1';
$pat = "abcdefghijklmnop";

$pat =~ s/$m/$r/;
print "$pat\n";

In other words, I want to refer to the matched
text in the replacement string. I've tried all manner
of escaping and /e, and so far no go.

Help?

Rob


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

Date: 23 Jul 1998 16:43:35 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Expanding $1 in a variable substitution
Message-Id: <7xiukod3vs.fsf@fidelio.vcpc.univie.ac.at>

Re: Expanding $1 in a variable substitution, Robert
<rseals@fore.com> said:

Robert> #!/usr/local/bin/perl -w
Robert> $m = "abc(.*)m";
Robert> $r = '$1$1$1';
Robert> $pat = "abcdefghijklmnop";
Robert> $pat =~ s/$m/$r/;
Robert> print "$pat\n";

eval "\$pat =~ s/...../";

perldoc -f eval

(and note the backslash to leave the dollar there.  We want
the lvalue "$pat" in the evalution, not $pat's current
rvalue).

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!    | personal email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.  |     tony_curtis32@hotmail.com


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

Date: Thu, 23 Jul 1998 07:12:43 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: File File Creation date
Message-Id: <MPG.1020e4b5ed551c1798977c@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc; copy mailed to Simon Ross 
<simon.ross@baesema.co.uk>.]

In article <35b71be4.0@nnrp1.news.uk.psi.net> on Thu, 23 Jul 1998 
12:20:33 +0100, Simon Ross <simon.ross@baesema.co.uk> says...
 ...
> I am using the stat() function to get the file creation date on certain
> files. This works fine however the displayed month is always a month behind
> the real creation date. I am using version 5.003_07 on a WindowsNT machine.

It is not quite clear what you mean by "the displayed month".  stat() 
returns dates/times in seconds since the Unix Epoch.  I presume you are 
then converting them to year, month, day, ... using gmtime() or 
localtime() in list context.  A glance at the documentation (perldoc -f 
gmtime` or `perldoc -f localtime`) would show you that the value for 
month ranges from 0 to 11.  If you are using them in scalar context, the 
correct name for the month should be displayed.

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


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

Date: Thu, 23 Jul 1998 08:41:51 -0500
From: John Adams <John.Adams@BentonvilleAR.ncr.com>
Subject: Re: File::Find Symlink Problem
Message-Id: <35B73D9E.2EA0@BentonvilleAR.ncr.com>

Tom Christiansen wrote:

> Normally that code is written
> 
>     return if $seen{$dev, $ino}++;
> 
> or
> 
>     unless unless $seen{$dev, $ino};

Huh?

	John A
	...speaking out of turn, and thus not for his employer


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

Date: 23 Jul 1998 14:09:20 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: File::Find Symlink Problem
Message-Id: <6p7g6g$4cp$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, John.Adams@BentonvilleAR.ncr.com writes:
:>     unless unless $seen{$dev, $ino};
:Huh?

Bad dup.

    return unless $seen{$dev, $ino}++;

--tom
-- 
    "One planet is all you get."


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

Date: Thu, 23 Jul 1998 14:03:52 +0200
From: Eric Zylberstejn <Eric.Zylberstejn@wanadoo.com>
To: ryan@steelplan.com.au
Subject: Re: format report blank line in output
Message-Id: <35B726A8.AD89AAC5@wanadoo.com>

Hello,

Ryan Snowden wrote:
> [...]
> format REPORT =
> 
> @|||| @|||  @||||||||||||||||||||||   @|||    @|  @|
>[...]
> How do i get rid of  the blank lines between each record?

Seems there is a blank line after 'format REPORT='.


	Eric.pl


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

Date: 23 Jul 1998 09:06:22 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Hash tree problems.
Message-Id: <6p7cge$lp3$1@monet.op.net>

Michael Bowler <mkbowler@nortel.com> wrote:
>> I am having problems with checking for existence of keys down non-existent
>> branches in a hash tree, causing those branches to be created. Is this how
>> perl is supposed to handle this?

In article <1dcl1vd.1gas7my2i4r2oN@bay1-156.quincy.ziplink.net>,
Ronald J Kimball <rjk@coos.dartmouth.edu> wrote:
>Well, the documentation seems to think so...

But I thought that `exists' was not supposed to trigger any sort of
autovivification; if it does, that is certainly a bug.  I wonder what
version of Perl Michael is using?


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

Date: 23 Jul 1998 13:12:48 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Hash tree problems.
Message-Id: <6p7csg$2fh$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, mjd@op.net (Mark-Jason Dominus) writes:
:But I thought that `exists' was not supposed to trigger any sort of
:autovivification; if it does, that is certainly a bug.  I wonder what
:version of Perl Michael is using?

Mark: $x->{A}->{B}->{C} only avoids autovivifying the final dereference.
The rest come to life, whether it be in an exists() test or othewise.
I suspect that to do otherwise would require tremendous changes in how 
and when Perl evalulates function arguments.

--tom
-- 
    "Since nobody ever compared Hitler to Hitler, being compared with Hitler
    immediately disqualifies you for Hitlerhood."
    	--Larry Wall


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

Date: Thu, 23 Jul 1998 10:14:16 -0400
From: David Lyons <lyonsd@atl.hp.com>
Subject: How many times...
Message-Id: <35B74538.62817A74@atl.hp.com>

has this happened to you?

You get an email or newsgroup post with replies that look like this:

somebody@somwhere wrote:
>
> this is some text but the line gets
truncated before
> the actual end of it.  And when you
click "reply",
> the resulting text looks like this:

> somebody@somwhere wrote:
> >
> > this is some text but the line gets
> truncated before
> > the actual end of it.  And when you
> click "reply",
> > the resulting text looks like this:


So, where can I find a script to "beautify" this text, so that it
looks like this:

somebody@somwhere wrote:
>
> this is some text but the line gets
> truncated before the actual end of it.
> And when you click "reply", the
> resulting text looks like this:


And when you reply, the text will be formatted corectly, like this:

> somebody@somwhere wrote:
> >
> > this is some text but the line gets
> > truncated before the actual end of it.
> > And when you click "reply", the
> > resulting text looks like this:

Anybody?  Bueller?....Bueller?.....Bueller?.....

Dave


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

Date: Thu, 23 Jul 1998 14:32:18 +0200
From: Eric Zylberstejn <Eric.Zylberstejn@wanadoo.com>
To: Danny van der Rijn <dannyv@tibco.com>
Subject: Re: installing perl in a different directory, @INC
Message-Id: <35B72D52.8FB6480C@wanadoo.com>

Jello,

Danny van der Rijn wrote:
> 
> i want to be able to compile perl (5.00404) and then have people install
> it whereever they want to.
> 
> on Solaris 2.6, this doesn't work so fine, since the @INC list is
> compiled into PERL and therefore PERL finds none of its libraries.
> [...]


Set PERL5LIB, do a 'man perlrun'.

Remember to put your platform specific librairies path in PERL5LIB.


	Eric.pl


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

Date: Thu, 23 Jul 1998 13:54:49 GMT
From: huntersean@my-dejanews.com
Subject: Re: Is Perl y2k compliant?
Message-Id: <6p7fb9$mkv$1@nnrp1.dejanews.com>

In article <35B64E8B.6B36D28E@att.com>,
  "Victor O." <vonyemelukwe@att.com> wrote:
> Hello All,
>
> Is Perl y2k?
>
> Thanks,
>
> Victoro
>
>
<Yawn>

Yes.

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


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

Date: Thu, 23 Jul 1998 14:09:53 GMT
From: huntersean@my-dejanews.com
Subject: Re: Is Perl y2k compliant?
Message-Id: <6p7g7h$njk$1@nnrp1.dejanews.com>

In article <6p5kj7$mkn$5@marina.cinenet.net>,
  cberry@cinenet.net (Craig Berry) wrote:
> Victor O. (vonyemelukwe@att.com) wrote:
> : Is Perl y2k?
>
> No, it's not.  We'll all be out of work in 17 months, and most of the Web
> will come crashing down, too.  It's not going to be pretty.
>

Either you don't know what you're talking about, or you're joking.  Perl *is*
y2k compliant, and performing the most obvious and simple little tests would
prove that.  To get dates, you use the gmtime or localtime functions.  Like
C, these are y2k.  If you want 4-digit dates, you add 1900 to the year.  If
you want 2 digits, you reduce it mod 100.  If you don't want to print it out,
it doesn't matter as 2000 will be year 100 in the structure and therefore
will still sort correctly and all intervals and ranges will be calculated
correctly. These functions rely on the c library which uses time_t to store
seconds since the epoch.  This will experience a roll-over in (IIRC) 2038,
unless you are using 64-bits for your time_t.  Since we all will be using
longer bit-widths for our archtectures by then, we have no cause for concern.
 Perl will continue to give _correct_ dates and times until the sun cools and
collapses.  If your perl distribution isn't y2k then your libc isn't either,
in which case perl is not your biggest worry.  The people who wrote the posix
definitions of the c libraries thought these things through a long time ago.

The web will not come crashing down, neither will the world end, and there
will not be a plague of locusts o'er the land.	Anyone who says perl will die
in the year 2000 doesn't know squat.  Read the camel book.  Look on
www.perl.com, or even better, read the sources.

Regards

Sean H.
Sean H.

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


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

Date: Thu, 23 Jul 1998 12:20:56 GMT
From: boubaker@dgac.fr
Subject: local %ENV buggy with open
Message-Id: <6p79r8$ggs$1@nnrp1.dejanews.com>



 hi perl gurus,

 This doesn't seems to be a FAQ (at least I do not found any clues anywhere).
 And this is my 2nd posting for this Q? Maybe the question is too stupid so
 that nobody want to waste time answering it, or maybe it is too tricky and
 nobody have enough competence to answer it ...?

 From a perl script I'm trying to launch another script w/ open but I want to
 set my own ENV for this script, but setting ENV after redeclaring it as local
 doesn't seems enough for open:

 This little script illustrate what I want to do and what happen actualy...

---8x-----try-it.pl----
#!/usr/local/bin/perl

my $level = $ARGV[0];$level++;

exit if $level > 2;

sub printenv {
    while ( my ($k, $v) = each %ENV ) {
        print "$level> $k \t=> \t$v\n";
    }
}

my %MY_ENV = ( 'MY_K1' => 'K1_VAL' );

# here %ENV contain the values of environ
printenv;

{
     local %ENV = %MY_ENV;
     # here %ENV contain the values of %MY_ENV
     # which is the expected behavior
     printenv;

     open( ENVX, "$0 $level |" ) or die "$0 $level | ... BOOM!";
     # the %ENV printed here is NOT the value contained
     # in the `local' %ENV
     while ( <ENVX> ) {
            print;
     }
     close ENVX;
}
#---end of try-it.pl -------


As a turnaround I can use the following hack:

my ($k, $v);
foreach $k ( keys %ENV ) {
    delete $ENV{ $k };
}
while ( my ($k, $v) = each %MY_ENV ) {
    $ENV{ $k } = $v;
}
# ...
open ...


But Why !!!! why redeclaring ENV as local in a block do not work as expected
w/ open !!! is it a bug, a feature or something I misunderstood ?

 regards

 - heddy -


--
- heddy -
- <URL: http://www.cenatls.cena.dgac.fr/~boubaker/>

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


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

Date: Thu, 23 Jul 1998 08:07:52 -0400
From: "Jeffrey J. Bachovchin" <bachovch@dev.upenn.edu>
Subject: Multiple Key Sort
Message-Id: <35B72798.4FE9BCF6@dev.upenn.edu>

Does anyone have a good algorithm for sorting data with multiple keys?  I have
what amounts to a matrix of data that needs to be sorted by a multiple number of
columns and have tried everything but have not been able to come up with one
that works.

Any help would be appreciated.
Thanks,
Jeff

-- 
Jeffrey J. Bachovchin
Associate Director, Advanced Technology
Development Information Services
University of Pennsylvania
512 Franklin Building
3451 Walnut Street
Philadelphia, PA 19104
Voice: 215 898-3644
Fax: 215 898-6864
Email: bachovch@dev.upenn.edu


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

Date: Thu, 23 Jul 1998 14:57:40 +0200
From: Eric Zylberstejn <Eric.Zylberstejn@wanadoo.com>
To: "Jeffrey J. Bachovchin" <bachovch@dev.upenn.edu>
Subject: Re: Multiple Key Sort
Message-Id: <35B73344.4DFD083@wanadoo.com>

Hello,

Jeffrey J. Bachovchin wrote:
> 
> Does anyone have a good algorithm for sorting data with multiple keys? 
> [...]

Start by 'perldoc perlfaq4'.
     How do I sort an array by (anything)?

     [...]
     If you need to sort on several fields, the following
     paradigm is useful.
     [...]


	Eric.pl


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

Date: Thu, 23 Jul 1998 14:32:43 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Multiple Key Sort
Message-Id: <35B73B7B.387FD1DE@nortel.co.uk>

Jeffrey J. Bachovchin wrote:
> 
> Does anyone have a good algorithm for sorting data with multiple keys?  I have
> what amounts to a matrix of data that needs to be sorted by a multiple number of
> columns and have tried everything but have not been able to come up with one
> that works.
> 
> Any help would be appreciated.
> Thanks,
> Jeff

One way of doing it would be to join the relevant columns together, and
then compare those new formed elements. Let me illustrate:

@arr = ('1*4*3*6*4*8',
        '3*6*1*8*6*9',
        '2*7*4*8*1*4',
        '2*5*2*9*7*5',
        '1*3*2*7*5*7',
        '3*7*1*7*4*5');


foreach $elem(sort routine @arr) {
  print "$elem\n";
}

sub routine {
 my  @c1 = split '\*', $a;
 my  @c2 = split '\*', $b;
 my $aa = join ('', $c1[0], $c1[1]); 
 my $bb = join ('', $c2[0], $c2[1]);
 $aa <=> $bb;
}

The routines joins the first two columns (represented by separating
stars) together, and then does a compare on those two elements. This way
is also easily applicable to alphabets, alphanumerics, etc... You could
as well have joined the first three columns, or column 1 and 3 ...

However, be warned. Wait for more elegant solutions. Happens all the
time in this newsgroups :)


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Thu, 23 Jul 1998 14:57:46 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Multiple Key Sort
Message-Id: <35B7415A.757AA47A@nortel.co.uk>

Eric Zylberstejn wrote:
> 
> Hello,
> 
> Jeffrey J. Bachovchin wrote:
> >
> > Does anyone have a good algorithm for sorting data with multiple keys?
> > [...]
> 
> Start by 'perldoc perlfaq4'.
>      How do I sort an array by (anything)?

Yup, the FAQ's way is definitely better

sub routine {
 my  @c1 = split '\*', $a;
 my  @c2 = split '\*', $b;
 $c1[0] <=> $c2[0] ||
 $c1[1] <=> $c2[1];
}

So, let me get this straight... If the first expression returns 0, it
means the expression is false, and the second gets evaluated, right ?
Else it gets shuffled, and the second expression is ignored.

BTW
Is it possible to explain how sort takes 2 elements of a list for
comparison in relatively simple terms ?


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Thu, 23 Jul 1998 11:48:00 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: need some info about perl
Message-Id: <35B722F0.DEAA0178@inlink.com>

Whenever you need an answer about Perl, go to http://www.perl.com 

HTH,
Brent


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

Date: Thu, 23 Jul 1998 16:36:50 +0200
From: "file" <file@job.to>
Subject: Re: need some info about perl
Message-Id: <6p7hnh$q1f$1@usenet36.supernews.com>

This should answer some of your questions...

http://republic.perl.com/history.html






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

Date: Thu, 23 Jul 1998 10:23:43 +0000
From: David Fleming <ddallasnc@worldnet.att.net>
Subject: Re: Newbie question: a script that ALMOST works (using CGI-lib.pl)
Message-Id: <35B70F2F.E5C70A4C@worldnet.att.net>

John,

 I turned off the part of the perl script that deletes the tmp file so I
could inspect it. It is fine. I also sent that tmp file with a      mail
dfleming@triadntr.net   < /tmp/my_comment.$pid    and it went through fine as
well. The ONLY problem is the wording/syntacs/whatever of those two lines. My
PERL interpiter doesn't like them. Sorry, I should have been more clear on
this.

*******************

John Moreno wrote:

> David Fleming <ddallasnc@worldnet.att.net> wrote:
>
> > I have some scripts that I copied from an older book that almost but
> > don't quite do what they are supposed to.
> >
> > The html part is fine:
> >
> -snip-
> >
> > The perl part works except for the two lines having to do with mailing:
> >
> > specifically these two:
> > $command="mail dfleming@triadntr.net < /tmp/my_comment.$pid";
> > system($command);
> >
> > The whole script is listed below!!
> >
> > #!/usr/bin/perl
> -snip-
>
> > open(COMMENTSFILE,">/tmp/my_comment.$pid");
>
> You don't check to see if open succeeds.
>
> -snip-
>
> > $command="mail dfleming@triadntr.net < /tmp/my_comment.$pid";
> > system($command);
>
> You don't know that the temp file exist, it'd be better if you had a
> assigned the file name to a variable so you could inspect it and make
> sure it's what you expect.
>
> Also - is it possible that "mail" isn't available?
>
> --
> John Moreno





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

Date: Thu, 23 Jul 1998 14:28:11 GMT
From: John Porter <jdporter@min.net>
Subject: Re: novice Q; reading columns of numbers
Message-Id: <35B74A0C.678D@min.net>

AC wrote:
> 
> (first cut, suggestions welcome).

 ... and needed!

>   #!/opt/perl5/bin/perl -w
>   $Idx = 0;
>   while (<>) {
>     s/,//g;

That's brutal, considering only one of the six fields needs it.


>     @Fld = split;
>     $Str[$Idx++] = "$Fld[0],$Fld[2],$Fld[3],$Fld[4],$Fld[1],$Fld[5]";

Learn to use slices.

	$Str[$Idx++] = join ',', @Fld[0,2,3,4,1,5];

or

	local $" = ',';
	$Str[$Idx++] = "@Fld[0,2,3,4,1,5]";


>   while (--$Idx ge 0) {

Besides the fact that this doesn't sort the records as per the
requirements, you're using the wrong comparison operator. You want

	while ( --$Idx >= 0 ) {


-- 
John Porter


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

Date: Thu, 23 Jul 1998 14:37:45 +0200
From: Eric Zylberstejn <Eric.Zylberstejn@wanadoo.com>
To: Jesse Rosenberger <jesse@savalas.com>
Subject: Re: OT? Fly GIF's
Message-Id: <35B72E99.10BBEE4@wanadoo.com>

Hello,

Jesse Rosenberger wrote:
> 
> Well this is probably a little off-topic, I know, but I couldn't find a
> newsgroup, or a decent mail-group that could help me.  I am in the
> process of writing a Perl script that will use 'Fly' to take text from a
> form (I already know how to do that part), and place it on an image at a
> certain spot, at a certain size, and in a certain color.
> [...]

Did you take a look at :
http://reference.perl.com/query.cgi?graphics

	Eric.pl


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

Date: 23 Jul 1998 13:56:34 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl array name
Message-Id: <6p7fei$4cp$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    lr@hpl.hp.com (Larry Rosler) writes:
:That is certainly a simple and usable approach, but might get you into 
:trouble in various ways.  For example, suppose the name is not a valid 
:Perl identifier?

Good question -- and here's a good answer: nothing at all. :-)

    $x = "isn't this cool?";
    $$x = "yowza";
    print ${"isn't this cool?"}, "\n";
  yowza

This can be useful.  For example,

    $path = "/etc/motd";
    open($path, $path) || die "$path: $!";
    while (<$path>) {
	warn "surprise";
    } 

Notice the filename is preserved.

--tom
-- 
    "Winter is worth its wait in cold." --Larry Wall


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

Date: Thu, 23 Jul 1998 14:33:36 GMT
From: john_dawson@my-dejanews.com
Subject: Re: Perl array name
Message-Id: <6p7hk0$p74$1@nnrp1.dejanews.com>

Larry,

  Thank you very much for your reply, as well as the others.
 Looking at your example and reading a perl book on the 'my'
statement, doesn't this limit the hash variables to the subroutine?
I'm wanting to build these arrays as to match the elements to a
record read from a file later into the program and outside the
subroutine. Again thanks to everyone for thier reply.


In article <MPG.101fe46cf810d8e989739@nntp.hpl.hp.com>,
  lr@hpl.hp.com (Larry Rosler) wrote:
> In article <6p5eh3$enn$1@info.uah.edu> on 22 Jul 1998 19:28:35 GMT, Greg
> Bacon <gbacon@cs.uah.edu> says...
> > [trimmed to 74 columns]
> >
> > In article <6p5cmd$a8b$1@nnrp1.dejanews.com>,
> > 	john_dawson@my-dejanews.com writes:
> > : Hello. I'm a newbe to Perl and starting to write a program. After extra
> > : variable name by using the substr function, I want to start an array wi
> > : name. As the program will enter this subroutine several times and the v
> > : will be different every time, I would like to write some generic code t
> >
> > Read the second called `Symbolic references' in the perlref manpage.
> >
> > Hope this helps,
> > Greg
>
> That is certainly a simple and usable approach, but might get you into
> trouble in various ways.  For example, suppose the name is not a valid
> Perl identifier?
>
> A more advanced way, which will teach you many more skills (and will work
> for any name string), is to use a hash (concept 1) to store a reference
> (concept 2) to an anonymous array (concept 3).
>
> It would look like this:
>
> my %arrays;
> $arrays{$variable} = [ $variable2, $variable3, $variable4 ];
>
> Note the square brackets, not parentheses.
>
> Then later you use
>
> @{$arrays{$variable}}
>
> to get at the whole array, or
>
> $arrays{$variable}->[constant or variable index expression]
>
> to get at a particular element (you can leave out the -> for neatness).
>
> But then you will no longer be a newbie to Perl :-)
>
> --
> Larry Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
>

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


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

Date: Thu, 23 Jul 1998 13:55:42 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl Beautifier Home Page
Message-Id: <35B74271.194B@min.net>

Zenin wrote:
> 
> I'd
> be quite surprised however, if you could not find a fixed width
> font (probably included in a real code editor) that was easier
> to read then the variable width font you're currently using.

What?  Included in the editor?  What kind of system are you on? DOS?
On MS Windows, X Window, and Mac, the fonts are in the system, not
the application.

-- 
John Porter


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

Date: Thu, 23 Jul 1998 14:16:33 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl Beautifier Home Page
Message-Id: <35B74753.E69@min.net>

Bart Lateur wrote:
> 
> Why not? :-) Even if you might succeed to convince me into using fixed
> pitch fonts for code, there will still be thousands of people who still
> write code that way. So a "general solution" that only works if you use
> fixed pitch fonts, is not a general solution. That was my argument.

Just how general does a solution have to be, to be considered a "general
solution"?  Must we insist that all new source code files be stored as
Unicode, and require the editors (and all the other tools) to support
that?
No?  Well, 99.999% of all programmers using fixed width fonts is general
enough in my book.


> if I read code in a fixed
> pitch font, like Courier, I notice that it tires me after a while. After
> only 10 minutes, I notice that I'm starting to stare at the letters. I
> must really concentrate to simply see what is written there. Besides,
> Courier is just a damn ugly. :-)

Uh, no arguments from me about Courier.  But I did not miss your subtle
elision: "fixed pitch font, like Courier", so all your arguments against
Courier apply implicitly to all fixed pitch fonts.  And of course, that
just ain't so.  I don't use Courier.  But I do use a fixed pitch font.
And it isn't ugly, and doesn't tire my eyes.


> So, the reason to use a variable pitch font, is the same reason why
> there are no books printed in a fixed pitch font either: variable pitch
> is simply far easier to read. Code is just text, anyway. 

No, not quite.
When I'm programming in Lisp, I want to able to see the parens.  In
every
(or nearly every(?)) variable width font, parentheses are wisps of hints 
of marks.  Commas need to be immediately distinguishable from periods.  
The same principle pertains to all punctuation marks.  
And it applies for all languages, not just Lisp.  

In programming, spacing of characters is utterly unimportant.
The compiler doesn't see it; why should I see it any differently from
the
compiler?  Also, some variable-width fonts seem to be ambivalent about
the difference between a backtick and a single quote.

-- 
John Porter


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

Date: Thu, 23 Jul 1998 16:23:27 +0200
From: Francoise Leduc <leduc@kazibao.net>
Subject: problem with NS cookies
Message-Id: <35B7475F.20199629@kazibao.net>

I set a cookie with javascript (using document.cookie =
"Kazibao=value";"expires=";"path=/";)

Then, I need to read and modify this cookie with cgi scripts (using the
perl cookie.lib).

With Internet Explorer, all works fine (reading and modifying the value)
With Netscape Navigator (3 and 4), I can only read the cookie, when I
try to set it to another value it doesn't work ! 

Is there any solution ? please help me 

Francoise


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

Date: Thu, 23 Jul 1998 16:16:55 +0200
From: Georg Klein <g.klein@mail.lvr.de>
Subject: Problem with Perl on AIX
Message-Id: <35B745D6.4F88DBD6@mail.lvr.de>

Hi,

the following code-example (multithreaded server) works fine on solaris
2.5. When i try to execute on AIX (4.2.1), it works one time, then the
server ends. Has anyone an idea?

Thanks

the example (of the book: Programming Perl)

!/usr/bin/perl -Tw
require 5.003;
use strict;
BEGIN { $ENV{PATH} = '/usr/ucb:/bin' }
use Socket;
use Carp;

sub spawn;  # forward declaration
sub logmsg { print "$0 $$: @_ at ", scalar localtime, "\n" }

my $port = shift || 2345;
my $proto = getprotobyname('tcp');
socket(Server, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l", 1))
                                             or die "setsockopt: $!";
bind(Server, sockaddr_in($port, INADDR_ANY)) or die "bind: $!";
listen(Server,SOMAXCONN)                     or die "listen: $!";

logmsg "server started on port $port";

my $waitedpid = 0;
my $paddr;

sub REAPER {
    $SIG{CHLD} = \&REAPER;  # if you don't have sigaction(2)
    $waitedpid = wait;
    logmsg "reaped $waitedpid" . ($? ? " with exit $?" : '');
}

$SIG{CHLD} = \&REAPER;

for ( ; $paddr = accept(Client,Server); close Client) {
    my($port,$iaddr) = sockaddr_in($paddr);
    my $name = gethostbyaddr($iaddr,AF_INET);

    logmsg "connection from $name [",
            inet_ntoa($iaddr), "]
            at port $port";

    spawn sub {
        print "Hello there, $name, it's now ", scalar localtime, "\n";
        exec '/usr/games/fortune'
            or confess "can't exec fortune: $!";
    };

}

sub spawn {
    my $coderef = shift;

    unless (@_ == 0 && $coderef && ref($coderef) eq 'CODE') {
        confess "usage: spawn CODEREF";
    }

    my $pid;
    if (!defined($pid = fork)) {
        logmsg "cannot fork: $!";
        return;
    } elsif ($pid) {
        logmsg "begat $pid";
        return; # i'm the parent
    }
    # else i'm the child -- go spawn

    open(STDIN,  "<&Client")    or die "can't dup client to stdin";
    open(STDOUT, ">&Client")    or die "can't dup client to stdout";
    ## open(STDERR, ">&STDOUT") or die "can't dup stdout to stderr";
    exit &$coderef();
}




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

Date: Thu, 23 Jul 1998 14:50:58 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Reading in a txt file to an associative array - Beginner ? Sorry
Message-Id: <35B74F64.3180@min.net>

Lee Fortnam wrote:
> 
> but I would like to be able to create my txt file from a dbase or excel
> prog and update the file when I need to without editing the main file.

Save the data from excel as a comma-separated text file; then it's easy
to read in the data in perl using the Text::CSV module.
In fact, the data can go back and forth between excel and perl this way.

-- 
John Porter


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

Date: 23 Jul 1998 15:20:38 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: References as strings
Message-Id: <isogugg0ux.fsf@godzilla.kiere.ericsson.se>

Hakan Jonsson <hakjo733@student.liu.se> writes:

> I am trying to store references as strings, and then later
> dereference them.

This is impossible. If you tell us what you're actually trying to
achieve, maybe someone can help.

Although I'm nearly sure that what you want is either Data::Dumper or
FreezeThaw. 
-- 
                    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Thu, 23 Jul 1998 13:38:01 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: References as strings
Message-Id: <35B72EA9.CDCF055F@nortel.co.uk>

Hakan Jonsson wrote:
> 
> I am trying to store references as strings, and then later dereference
> them. THis far, I have not succeded. Perhaps someone could give me an
> advice.
> 
> For example, if I do like this:
> 
> $a = "string";
> $ref_to_a = \$a;
> $string_ref_to_a = "$ref_to_a";
> 
> $string_ref_to_a upon being printed looks something like
> SCALAR(0x9f29c), but
> it can not be dereferenced. Is there a way to convert the "stringed"
> reference back into a hard reference, or some other way to get to the
> data in that location without using the real reference variable?
> 


Haven't you read perlref ? Why do you know about references then? If you
want to see the value of a reference DEREFERENCE.

$a = "string";
$ref_to_a = \$a;
$string_ref_to_a = $ref_to_a;
print $$string_ref_to_a; # note the dereferencing.

However, change line 3 to 

$string_ref_to_a = "$ref_to_a";

Apparently, the value of $ref_to_a just gets iterpolated,
$string_ref_to_a, is not a reference anymore, but a simple string, which
is why line 4 won't print anything.
Now, change line 3 to 

$string_ref_to_a = "$$ref_to_a"; # and line 4 to 
print $string_ref_to_a; 

This prints 'string'. $string_ref_to_a isn't a reference, though, so if
you change line4 back to: 

print $$string_ref_to_a; # Nothing will be printed.

HTH
-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


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

Date: Thu, 23 Jul 1998 10:44:14 -0400
From: Michael Maraist <maraism@sterlingdi.com>
Subject: Re: regexp question
Message-Id: <35B74C3E.7990056E@sterlingdi.com>

> I am trying to come up with a regexp that will match the size
> attribure in an HTML <FONT> tag and am failing miserably.
> 
> Why doesn't this expression
> m/<font.*?\s(SIZE=.*?)[>\s]/
> 
> match this string?
> <font COLOR="#006600" SIZE="+1">
> 
> I know that '<font' matches. Then match all the characters up until
> the first instance of a whitespace character folowed by 'SIZE='.  Then
> match what the size is set to, then match the end of the attribute
> because or the whitespace or match the end of the tag '>'.
> 
> I am trying to write a one-liner that will go through and remove all
> the relative font sizes from a web site.  Any help is appreciated.
> Thanks.
> 
> Tim Gray

I set a variable to the above string and successfully extracted the
SIZE="+1" portion with your reg-ex.  If you are not even getting that
much, check to make sure all your characters are parsed correctly.


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

Date: Thu, 23 Jul 1998 12:45:42 GMT
From: adtp@cix.compulink.co.uk ("Advent Dtp")
Subject: Re: STUMPED!!! (perl trivia)
Message-Id: <EwJss6.IBH@cix.compulink.co.uk>

In article <6p6kjl$a9f@news1.panix.com>, NOSPAMkEynOn@panix.comNOSPAM (k y 
n n) wrote:

> 
> 
> I have a variable $x containing a pack()ed, nil-padded string (to be
> precise, it was produced via pack('a64', "foo"), but, in general, the
> unpadded length is unknown); I want to produce a variable $y
> containing the unpadded string.  To my chagrin, I haven't managed to
> come up with anything better than:
> 
> $y = join('', map chr, grep($_ > 0 , unpack 'c*', $x))
> 
> Since I've "solved" the problem, however inelegantly, I guess this
> question reduces to one of perl trivia: how to do this more elegantly?
> I'm sure there's a simple, direct way of doing this, but hellifiknow
> what it is.  Any ideas?
> 
> K.
> 
> 
> 

How about:

  ($y) = $x =~ /([^\0]*)/;

or: (assumes padding exists)

  $y = substr $x,0,index ($x,"\0");


Dave Hartnoll.


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

Date: 23 Jul 1998 08:59:33 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: STUMPED!!! (perl trivia)
Message-Id: <6p7c3l$lm4$1@monet.op.net>


In article <EwJss6.IBH@cix.compulink.co.uk>,
Advent Dtp <adtp@cix.compulink.co.uk> wrote:
>How about:
>
>  ($y) = $x =~ /([^\0]*)/;

Doesn't work, because $x might contain internal \0 that are not part
of the padding.


>or: (assumes padding exists)
>
>  $y = substr $x,0,index ($x,"\0");

Ditto.

You need to use an anchored serch to make sure that the padding is at
the end, like this:

	($y = $x) =~ s/\0+$//;


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

Date: Thu, 23 Jul 1998 13:26:15 GMT
From: adtp@cix.compulink.co.uk ("Advent Dtp")
Subject: Re: STUMPED!!! (perl trivia)
Message-Id: <EwJunr.M6t@cix.compulink.co.uk>

In article <6p7c3l$lm4$1@monet.op.net>, mjd@op.net (Mark-Jason Dominus) 
wrote:

> Doesn't work, because $x might contain internal \0 that are not part
> of the padding.
> 

I had assumed there were no \0 in the original string (then there would be 
NO solution that could restore an unpadded string that originally had 
trailing \0's). I based this assumption on the original poster's solution 
which simply removed all \0's.

I like your solution though.

Dave Hartnoll.


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

Date: 23 Jul 1998 08:33:36 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: STUMPED!!! (perl trivia)
Message-Id: <6p7aj0$leg$1@monet.op.net>


In article <6p6kjl$a9f@news1.panix.com>,
k y n n  <NOSPAMkEynOn@panix.comNOSPAM> wrote:
>I have a variable $x containing a pack()ed, nil-padded string; I want
>to produce a variable $y containing the unpadded string.


	$x = s/\0+$//;

comes to mind for me.


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

Date: Thu, 23 Jul 1998 13:58:37 GMT
From: voonh@my-dejanews.com
Subject: Re: system() return values
Message-Id: <6p7fid$mu0$1@nnrp1.dejanews.com>

In article <35B352DC.D24CC4C3@gpu.srv.ualberta.ca>,
  gcoulomb@gpu.srv.ualberta.ca wrote:
> Okay, perhaps I need to be more literal: I was looking for advice that
> was NOT in the manpages because the procedure recommended in the manpage
> gives me the same result whether the external program succeeded or
> failed. I was wondering whether anyone had ever seen this kind of
> behavior before and could recommend a course of action. In case it
> matters to anyone, the scripts are running on an AIX/RS6000 as CGI
> scripts.
>

Just to say that I seem to be having a similar problem. I'm running perl
v5.004_01 on AIX 4.2.1 and sometimes a system("tctl...") gives me a return
code of -1 even though it looks like it has succeeded correctly. When I do a
>>8 operation on it, I get 16777215, which is 2^24-1. Any relevance?

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


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

Date: Thu, 23 Jul 1998 16:32:59 +0200
From: "Joerg Wagner" <jwagner@digilog.de>
Subject: To STRICT for me !
Message-Id: <#5p8xbkt9GA.91@upnetnews03>

When using  the  "use strict;"  pragma  I get lots of errors like
>    Global symbol "$someVariable" requires explicit
>    package name at script line XXX."

Happens even if I use   "my $someVariable;".

The man-pages explane the error message as:
>   You've said ``use strict vars'', which indicates that all variables
>   must either be lexically scoped (using ``my''), or explicitly qualified
>   to  say which package the global variable is in (using ``::'').

But this is exactly what I have done (using "my")

!!!! HELP ME PLEASE !!!!
Jvrg Wagner





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

Date: Thu, 23 Jul 1998 14:33:23 GMT
From: John Porter <jdporter@min.net>
Subject: Re: What's wrong?
Message-Id: <35B74B45.2B19@min.net>

Greg Bacon wrote:
> 
> ...or just use ./ex

Sure; or put . is before /usr/bin in your path.

But better advice is to not name your programs the same as
other programs!

-- 
John Porter


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

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

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