Re: how to copy a hash ?

2001-05-30 Thread ___cliff rayman___
that will only copy a shallow hash. that is, one that does not contain references to other hashes or arrays. if you want to copy all elements (a deep copy), here is a suggestion: use Storable qw(freeze thaw); %arr1=qw(key1 data1 key2 data2); $arr1{key3}=[qw(arrdata1 arrdata2)]; %arr2=%{thaw f

Re: 'while' confusion

2001-05-30 Thread ___cliff rayman___
"E. Alan Hogue" wrote: > > > foreach $field (@fld_vals) { > while ($field = '') { i think u want an 'if' here. when you use a 'while', the program continues to loop if the condition is true. this usually implies you will do something to change the condition within the loop. since you a