in reply to Re^2: Bizarre copy of ARRAY
in thread Bizarre copy of ARRAY

BTW,what are x,m,g,s for?I am using it because I saw it somewhere and thought its useful

Replies are listed 'Best First'.
Re^4: Bizarre copy of ARRAY
by Corion (Patriarch) on Mar 20, 2011 at 08:58 UTC

    See perlop, and likely perlretut and perlre while you're at it. "Seeing things somewhere" is a good start, but you should read up on the documentation what things mean instead of blindly using them.

Re^4: Bizarre copy of ARRAY
by ikegami (Patriarch) on Mar 20, 2011 at 19:27 UTC
    • 'x' affects how whitespace and '#' behave.
    • 'm' affects how "^" and "$" behave.
    • 's' affects how "." behaves.

    See perlre for details on the above (since they affect regex patterns) and see perlop for 'g' (since it's affects the substitution operator).