Hi, I need print just $name, $lastName, $address, $phone and $email from %contact, and it's has to be in this format and with dumper.
================================================ Name LastName Email Address Phone ================================================ name1 lasname email address phone This is the code until now.
#!/usr/bin/perl use strict; use warnings; use diagnostics; use Data::Dumper; my %contact; my $input; sub entrada{ my ($var) = shift; print "Ingrese $var: "; my $in = <STDIN>; return $in; } sub contact_entry { my @contact =(); my $name = entrada('Name'); my $lastName = entrada('Last Name'); my $address = entrada('Address'); my $email = entrada('Email'); my $phone = entrada('Phone Number'); my $image = entrada('Image Profile'); my $detailProfile = entrada('Detail Profile'); my %contact_entry = ( name => $name, lastName => $lastName, address => $address, email => $email, phone => $phone, image => $image, detailProfile => $detailProfile ); return %contact_entry; } sub contact_list { my (%contact) = shift; } %contact = contact_entry; print "Desea ingresar mas Contactos?[S/n]:"; $input = <STDIN>; chomp($input); if ($input eq 's') { print "Cargar mas contactos\n"; } else { print <<EOF; ============================================== Nombre Apellido E-mail Direccion Telefono ============================================== EOF print Dumper(\%contact); exit 1; }

In reply to Print Data::Dumper with format by Matiasinf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.