Jonathan Paton schreef:
You should not fiddle with $[ though. Unless you are creating an
entry into the obfuscated code contest or a YAPH.


Thanks for the idea :)

@words = ("another ", "hacker\n", "Just ", "Perl ");
eval '$[=' . $_ . ';print $words[3]' for 1, 3, 0, 2;

The eval is required because you can only set $_ to a constant
value.

Nice one! I even think I understand it :-p
Shouldn't there be a ; after [3]? But no, let me guess: you don't need to type the last ; of your program?


H.

--
Hendrik Maryns

Interesting websites:
www.lieverleven.be      (I cooperate)
www.eu04.com            European Referendum Campaign
aouw.org                The Art Of Urban Warfare


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to