in reply to How can I place each "word" of a string in a varible if I don't know the length of the string?

how about something along the lines of: @words = qw($string); Just a suggestion, mind you...no need to attack me if I'm wrong.

______________________________________________
If the world didn't suck, we'd all fly off.
       -A friend of mine

  • Comment on Re: How can I place each "word" of a string in a varible if I don't know the length of the string?
  • Download Code

Replies are listed 'Best First'.
Re: Re: How can I place each "word" of a string in a varible if I don't know the length of the string?
by lemming (Priest) on Jan 10, 2001 at 23:47 UTC
    You might of wanted to test that statement out:
    @words = qw($string); puts the value '$string' into $words[0]
Re (tilly) 1: How can I place each "word" of a string in a varible if I don't know the length of the string?
by tilly (Archbishop) on Jan 10, 2001 at 23:48 UTC
    A suggestion. If you think there is a good chance that you may be wrong, try testing before posting.

    Incidentally your suggestion of qw($string) is wrong.