[perl] Hash, como ver sus valores

OCR ocano@lagente.com
Mon, 16 Apr 2001 11:41:15 -0500


Tengo una variable hash en lacual cuando pido sus llaves y valores con los
procesos "keys " y "values", respectivamente optengo lo siguiente:
ASIGNACION:
  %hash_tmp=split /,/,$RSpatron[0];
  @hash_tmp1= keys %hash_tmp;
  @hash_tmp2= values %hash_tmp;
  $tmpocr=$hash_tmp{'u.cur1_area'};

IMPRESION EN HTML:
<h5>Llaves: @hash_tmp1<br>valores: @hash_tmp2<BR>u.cur1_area: $tmpocr</h5>

RESULTADO:
Llaves: 'u.cur1_area' 'u.ed1_lugar' 'u.exp1_act' 'u.exp1_jefe' 'u.edo'
'u.cur1_inst' 'u.exp1_pcargo' 'u.ed1_carrera' 'u.ciudad1' 'u.ed1_escuela'
'u.apellidos' 'u.cur1_nombre' 'u.exp1_puesto' 'u.sexo' 'u.exp1_tel'
'u.nombre' 'u.idioma1' 'u.ed1_uni' 'u.exp1_cia' 'u.pais' 'u.apellidos1'
'u.exp1_giro' 'u.edo_civil'

valores: 'R.H.' 'IPN' 'CONOCIMIENTOS' '201' '10' 'ITAM' '60' '02' '23' '202'
'CANO' 'LIDERAZGO' 'PUESTO' '2' '01' 'OSCAR' '08' 'DR. H.C.' 'LAGENTE.COM'
'42' 'RODRIGUEZ' 'D.14' '2'

u.cur1_area:

NOTEN QUE EN ULTIMO CAMPO NO ME DESPLIEGA NADA: Segun yo deviera desplegar
'R.H.'
he intentado:
  $tmpocr=$hash_tmp{u.cur1_area};
Y NADA.
Que estoy haciendo mal? gracias.

--------- Pie de mensaje --------------------------------
Visite: http://tlali.iztacala.unam.mx/~randrade/perl.shtml
Cancelar inscripcion:
mail to: majordomo@tlali.iztacala.unam.mx
text   : unsubscribe perl