Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!ucsd!ogicse!schaefer From: schaefer@ogicse.ogc.edu (Barton E. Schaefer) Newsgroups: comp.lang.perl Subject: "print" bug in subscripting with $[ Message-ID: <7280@ogicse.ogc.edu> Date: 12 Feb 90 21:34:15 GMT Reply-To: schaefer@ogicse.UUCP (Barton E. Schaefer) Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR Lines: 17 The following one-liner demonstrates one aspect of the problem: % perl -e 'sub oops { print "$_[$[]?\n"; }; do oops("aha");' Invalid component in string or format at /tmp/perl-e005977 line 2. Interestingly, if the "?" is omitted, it prints "aha" but without the newline (% is the csh prompt): % perl -e 'sub oops { print "$_[$[]\n"; }; do oops("aha");' aha% This is 3.0 patchlevel 6, so feel free to tell me it's already working. -- Bart Schaefer "February. The hangnail on the big toe of the year." -- Duffy schaefer@cse.ogi.edu (used to be cse.ogc.edu)