in reply to Passing a $Scaler into a while loop...
First, that code won't compile. You have an unmatched right curly bracket.
Do you get any warnings? I get a couple "Use of uninitialized value" warnings. Hint: add a few print statements. I don't think the value of $_ is what you think it is.
I'm not sure why you need to declare $cut outside the scope of the loop. If there is a reason for doing it that way, it's not evident from the code you posted.
Finally, you split the line into @words, but you only test one word for vowels. You'll need to loop over each element of @words if you want to test every word on the line.
I hope this gives you a starting point. It sounds a bit like homework so I tried to err on the side of hints rather than handing you a solution outright.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing a $Scaler into a while loop...
by chinamox (Scribe) on Oct 09, 2006 at 04:39 UTC | |
by chargrill (Parson) on Oct 09, 2006 at 06:16 UTC |