-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Tom Phoenix
Sent: Monday, February 20, 2006 10:50 PM
To: Bowen, Bruce
Cc: beginners@perl.org
Subject: Re: bug or am I not understanding?


On 2/20/06, Bowen, Bruce <[EMAIL PROTECTED]> wrote:

> My question to the group is why would this line recognize that carriage 
> return.

> @lines = split /\n/, <STATE>;

> and this not recognize the same character;

> $a = index($state, "/\n");

The second parameter you're passing to index() is a two-character
string. Is that your bug? (Are you also setting $/ to a non-default
value? Else I don't understand your intent.) Hope this helps!

Would $a = index($state, /\n); then be the correct format to find the end of 
the line or a carriage return?  Because that gives errors.  I'm getting the 
impression you can use \n with some commands and not others.  Just that it 
doesn't seem to be documented anywhere.

TX,
Bruce



--Tom Phoenix
Stonehenge Perl Training

--
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