in reply to Re[3]: How's your Perl?
in thread How's your Perl?
Read your rules. You don't specify HOW the value of $x[0] is changed :-) vis Create an array @x such that changing $x[0] also sets $x[1] to the same value While assignment is one way to change a value....
@x=(\$_,\$_); $_=10; print "\$x[$_] = ${$x[$_]}\n" for 0..$#x; $_=20; print "\$x[$_] = ${$x[$_]}\n" for 0..$#x; __DATA__ $x[0] = 10 $x[1] = 10 $x[0] = 20 $x[1] = 20
cheers $[
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re[3]: How's your Perl?
by Juerd (Abbot) on Oct 27, 2003 at 08:11 UTC | |
by tachyon (Chancellor) on Oct 27, 2003 at 08:29 UTC | |
by Juerd (Abbot) on Oct 27, 2003 at 08:33 UTC | |
by xmath (Hermit) on Oct 27, 2003 at 10:06 UTC |
In Section
Meditations