"R. Joseph Newton" wrote:
>
> Lance wrote:
>
> > If I hafta pass in refs from loop1 2 and 3 all the way down the line, So Be
> > It. It just makes my argument list a little unsightly, is all.
>
> You might want to re-examine this view. The process of passing by reference
> is not something to
R. Joseph Newton wrote:
Lance wrote:
If I hafta pass in refs from loop1 2 and 3 all the way down the line, So Be
It. It just makes my argument list a little unsightly, is all.
It can also help you prevent confusion.
I agree with what you said, particularly about scalability and
enca
Lance wrote:
> If I hafta pass in refs from loop1 2 and 3 all the way down the line, So Be
> It. It just makes my argument list a little unsightly, is all.
Hi Lance,
You might want to re-examine this view. The process of passing by reference is not
something to just resign yourself to. It i
you're probably right. Danger, Will Robinson! ;-)
> Very few things are impossible in Perl. I remember to have seen some
> way to access the lexical variables of the calling subroutine. If I
> had to I would find it, but ... you don't want to do that.
>
> If you want other procedures to be able
From: "Lance" <[EMAIL PROTECTED]>
> Thanks guys! I did not think that it was possible, but some Perl
> guru might be able to prove me wrong.
Very few things are impossible in Perl. I remember to have seen some
way to access the lexical variables of the calling subroutine. If I
had to I would f
Thanks guys! I did not think that it was possible, but some Perl guru
might be able to prove me wrong. I just did not want to pass references
into the subs, as a) I have nested loops, with nested subs b) Looking for
an easy way to do it. c) growing my meager Perl skillz.
So I have:
Bob Showalter wrote:
> ...
> But foreach loops are funny. Try this:
>
> use strict;
>
> our $x = "Hello";
Aargh! That should be "my". To much confusion in my cutting/pasting.
>
> printx();
> for $x (1..3) {
>print "$x\n";
>printx();
> }
> printx();
>
> sub printx { print "$x\n"; }
>
To: [EMAIL PROTECTED]
From: "Lance" <[EMAIL PROTECTED]>
Subject: inner variable access
Date sent: Tue, 11 Feb 2003 17:49:25 -
> Is there a way to access the 'foreach' variable from a subprocedure
Rob Dixon wrote:
> Lance wrote:
> > Is there a way to access the 'foreach' variable from a subprocedure
> > called from inside the loop whose variable you want to access?
> > Hooboy, even I don't understand that question! ;-) An example is
> > neccessary, I believe:
> >
> >foreach my
Lance wrote:
> Is there a way to access the 'foreach' variable from a subprocedure
> called from inside the loop whose variable you want to access?
> Hooboy, even I don't understand that question! ;-) An example is
> neccessary, I believe:
>
>foreach my $store( values %$server ){
>
Is there a way to access the 'foreach' variable from a subprocedure called
from inside the loop whose variable you want to access? Hooboy, even I
don't understand that question! ;-) An example is neccessary, I believe:
foreach my $store( values %$server ){
if( $$store{
11 matches
Mail list logo