so please don't flame
Are you sure about that? Its cold outside, how will you keep warm?
use strict/warnings to cut your development time in half! strict and warnings have also been called "training wheels" but they're more like "sanity checks" or seatbelts , professionals use them long after they've learned to ride a bike
See ExtUtils::MakeMaker::prompt, you could write
use ExtUtils::MakeMaker qw' prompt '; ... if( prompt('Are you new?', 'n') =~ /y/ ){ my $username = prompt('Your name is?','John Smith'); $username =~ s/\s+$//; ... } else { my $username = prompt('Who are you','John Smith'); $username =~ s/\s+$//; ... }
Or even
if( prompt('Are you new?', 'n') =~ /y/ ){ CreateNewUser(); } else { ActivateOldUser(); }
where CreateNewUser and ActivateOldUser do all that prompt/DBI stuff from before
In reply to Re: MySQL Table adding with Perl
by Anonymous Monk
in thread MySQL Table adding with Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |