Re: stuck in a while loop
- From: Tad McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 07:59:03 -0500
Nospam <nospam@xxxxxxxx> wrote:
Can anyone identify what is wrong with code,
What does it do? What do you want it to do instead?
or worse how to fix it?,^^^^^
Knowing how to fix it would be *better* than just pointing
out what was wrong.
it
worked one time, but not anymore, I have hardly made any changes
Then what is wrong is where you made the changes.
Where did you make the changes?
use constant START => "<FILE2>";
Your program never uses this constant, so why is it there?
my $START = <FILE2>;
(my $varia1 = $START) =~ s/\@.*//;
$varia1 has a newline at the end. Is that what you want it to have?
$mech->field('login',"$varia1");^ ^
^ ^
perldoc -q vars
What's wrong with always quoting "$vars"?
my @content1 = $content3;
How many elements are in the @content1 array?
foreach my $content2 (@content1) {
A loop that iterates one time is not much of a loop.
open (FILE, ">> hm5.txt");
You should always, yes *always*, check the return value from open().
last;
}
There is no need to exit "early" from a loop that only iterates
one time anyway...
--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.
- References:
- stuck in a while loop
- From: Nospam
- stuck in a while loop
- Prev by Date: Re: A question of speed
- Next by Date: FAQ 4.26 How do I reformat a paragraph?
- Previous by thread: Re: stuck in a while loop
- Next by thread: test value
- Index(es):
Relevant Pages
|