On Aug 2, Michael Fowler said: >You can only print a string. When print is given multiple arguments it >joins them with $" before printing. This is documented in perldoc -f print. *Cough* $, not $". $" is used when you put an array (or array slice) in double quotes. <WIZARDRY> And, upon checking the source, you're incorrect. /* from pp_hot.c:pp_print() */ while (MARK <= SP) { if (!do_print(*MARK, fp)) break; MARK++; if (MARK <= SP) { if (!do_print(PL_ofs_sv, fp)) { /* $, */ MARK--; break; } } } That loop, in Perl, would look like: $_ = 0; while ($_ < @output) { last unless NATIVE_PRINT($output[$_]); $_++; if ($_ < @output) { $_--, last unless NATIVE_PRINT($,); } } -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: memory for implied array/list read
Jeff 'japhy/Marillion' Pinyan Thu, 02 Aug 2001 20:50:55 -0700
- Re: memory for implied array/list <HANDLE... Michael Fowler
- Re: memory for implied array/list <H... Paul
- Re: memory for implied array/list <H... Michael Fowler
- Re: memory for implied array/list &... Jeff 'japhy/Marillion' Pinyan
- Re: memory for implied array/li... Michael Fowler