LoneWolf wrote:

> Here's what I have, and I am sure there is a better way to do this...
>
> The problem I am getting is checking to see if one field matches the city,
> and if it does keeping it the same, however if it does not it needs to have
> a "1-" added to the front of that field...

I think the problem comes up right here.  You are dscribing the problem in terms
of
details of the mechanism you think may work, rather than in terms of its logical
description.
Doing this handicaps your effort from the start.  "One field"?  Of what?  What
is it about
that field that makes for a match?

>
>
> <-- CODE -->
> #!/usr/bin/perl -w
>
> #####
> #
> # Main Functions of the script, makes calls to all of the subscripts
> performing the functions.
> # Also creates pretty output for everyone to check out.  This script is
> designed to run after WGEN has been run.
> #
> #####
>
> no warnings qw(uninitialized);
>
> $content_type   = "Content-Type: text/html\n\n";
>
> print <<ENDPAGE;
> [EMAIL PROTECTED]
> <html>
> <head>
>         <title>Customer Parsing Form</title>
> <body bgcolor="white" text="black">
> <BR>
> <center> CUSTOMER FILE DOWNLOAD AND CONFIGURE</center>
> <HR>
> <BR>
> This will download and create the files onto the Intranet from Stanpak.
> Login to Stanpak FIRST and run ROBERT and ROBERT2 from *QICLOOK to create
> the files this script needs to handle the rest of this process.<BR>

This should be at least three sentences.  Not a Perl issue, you say?  Think
again.  The above is
meaningful only to someone who doesn't need to read it.  All the user seeing
this from the web
should need to know is the end result.  The details are your [the programmers]
problem.

Just as the above should be broken down into clear sentences, so should the
problem itself.

Please see Wiggins post concerning the code itself.  Most of this should be done
with loops,
and probably a small data file to hold the names of all the files you are
seeking to write.

Can you try re-posing the problem de novo?  Instead of describing programming
structures,
describe what you have for information coming in, and what you hope to come out
with?

You get there much faster when you know where you are headed.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to