in reply to Re^2: foreach loops
in thread foreach loops

Thank you everyone. I think I've strayed into the relms of perl magic. What are these operators called? I'd like to find out more about them

$,

$\

Replies are listed 'Best First'.
Re^4: foreach loops
by lyklev (Pilgrim) on Oct 08, 2006 at 12:28 UTC
    They are not operators but variables. The $, is the string that gets printed between fields automatically, nothing by default. The $\ is what gets printed after allf fields, again nothing by default. If you set it to "\n", every print command will print a newline.

    All these nice variables can be found in the perlvar documentation.

Re^4: foreach loops
by shmem (Chancellor) on Oct 08, 2006 at 12:42 UTC