Re: [Boston.pm] transpose? Re: Loop index in foreach?

2006-09-21 Thread Bill Ricker
Note : This 0..$#array would have been INefficient for big array back before for(0..$N) was optimized with a lazy list. When exactly did that happen? Long enough ago that if you find a Perl on which perl -le foreach (0..100_000_000) { print } | more has a seg or heap fault

Re: [Boston.pm] Finding UNIX username

2006-09-21 Thread Kate Wood
On 9/21/06, Alex Brelsfoard [EMAIL PROTECTED] wrote: I know I've done this before, but I'm having a hard time finding my old code, and am not using the right search terms on google... All I am looking for is the quickest method to find the user who is calling this script. This is a script

Re: [Boston.pm] Finding UNIX username

2006-09-21 Thread Dan Boger
On Thu, Sep 21, 2006 at 11:30:08AM -0400, Alex Brelsfoard wrote: I know I've done this before, but I'm having a hard time finding my old code, and am not using the right search terms on google... All I am looking for is the quickest method to find the user who is calling this script. This is

Re: [Boston.pm] Finding UNIX username

2006-09-21 Thread Ben H Kram
From perldoc perlvar: $REAL_USER_ID $UID $ The real uid of this process. (Mnemonic: it's the uid you came from, if you're running setuid.) You can change both the real uid and the effective uid at the same time by using

Re: [Boston.pm] Finding UNIX username

2006-09-21 Thread Andy Lester
On Sep 21, 2006, at 10:32 AM, Kate Wood wrote: On 9/21/06, Alex Brelsfoard [EMAIL PROTECTED] wrote: I know I've done this before, but I'm having a hard time finding my old code, and am not using the right search terms on google... All I am looking for is the quickest method to find the

Re: [Boston.pm] transpose? Re: Loop index in foreach?

2006-09-21 Thread Jeremy Muhlich
On Thu, 2006-09-21 at 08:08 -0400, Bill Ricker wrote: Note : This 0..$#array would have been INefficient for big array back before for(0..$N) was optimized with a lazy list. When exactly did that happen? Long enough ago that if you find a Perl on which perl -le foreach

Re: [Boston.pm] Loop index in foreach?

2006-09-21 Thread Duane Bronson
$.. should be the iterator count in the parent loop, $... should be the iterator count in the grandparent loop, ... my @fruits = ('apple','banana','cantaloupe'); foreach my $fruit (@fruits) { foreach my $minusone (0..1000) { foreach my $plusone (2..1000) { die inner loop count wrong