in reply to Re: Re: regular expressions and substituting in variables.
in thread regular expressions and substituting in variables.

Thanks that pointed showed 2 things I'm doing wrong. 1) the restoring. when I put that back I had the same issue on my script but not on the snipit given here the difference is I'm using a reference to an array in the script and so I'm not doing a copy I'm doing a ?pointer? is there anyway to stop that?
  • Comment on Re: Re: Re: regular expressions and substituting in variables.

Replies are listed 'Best First'.
Re: Re: Re: Re: regular expressions and substituting in variables.
by chipmunk (Parson) on Jan 23, 2001 at 02:57 UTC
    It sounds like you want to do a deep copy, which you can find out about in Creating a copy of an array.

    If your data structure is just one array deep, though, this should be sufficient: $dn = [ @$s_dn ]; which creates a new array with the contents of the array referred to by $dn_sn.