Matiasinf has asked for the wisdom of the Perl Monks concerning the following question:
================================================ 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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print Data::Dumper with format
by Athanasius (Archbishop) on Oct 20, 2014 at 02:53 UTC | |
by Matiasinf (Initiate) on Oct 20, 2014 at 03:11 UTC | |
|
Re: Print Data::Dumper with format
by GotToBTru (Prior) on Oct 20, 2014 at 02:35 UTC | |
|
Re: Print Data::Dumper with format
by Loops (Curate) on Oct 20, 2014 at 02:30 UTC | |
by Matiasinf (Initiate) on Oct 20, 2014 at 02:38 UTC | |
by Loops (Curate) on Oct 20, 2014 at 03:55 UTC | |
|
Re: Print Data::Dumper with format
by Anonymous Monk on Oct 20, 2014 at 19:42 UTC |