> -----Original Message-----
> From: Brian [mailto:[email protected]]
> Sent: Friday, April 17, 2009 11:03
> To: Perl Beginners
> Subject: help needed to get over endless loop
>
> Hi
> I had this semi-working, changed something and can't remember where I
> went right, so would appreciate some help getting back on top.
>
> I know 1..10 and 2..10 probably won't work in the following
> example, I
> have just changed lines to show what I am trying to get.
>
You are not running with strict, warnings which would give you a
heads up
> $mystart = -2;
> $i = 1;
>
> for ($i = 1..10 ) {
>
> while ($i = 1 ) {
You would get warning if warnings were on. You are assigning 1
to $i and not $i == 1.
Better to give your code for the list to review.
If you have any questions and/or problems, please let me know.
Thanks.
Wags ;)
David R. Wagner
Senior Programmer Analyst
FedEx Freight
1.719.484.2097 TEL
1.719.484.2419 FAX
1.408.623.5963 Cell
http://fedex.com/us
> if ($mystart < 1 ) {print "line 1 no data"}
> if ($mystart > 0 ) {print "line 1 data"}
> $mystart++ ; $i++;
> }
> }
>
>
>
> while ($i = 2..10 ) {
> if ($mystart < 1 ) {print "line 2..10 no data"}
> if ($mystart > 0 ) {print "line 2..10 with data"}
> $mystart++ ; $i++;
> }
> }
>
>
> thanks
> Brian
>
>
> --
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> http://learn.perl.org/
>
>
>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/