Re: parsing strings

2001-09-25 Thread Tyler Cruickshank
Another Newbie responding . or, if you wanted the first "word" in $part1 (not necessairly the first 4 characters) you could do: @list = split(/ /, $part1); $part2 = $list[0]; Here you split the $part1 variable on whitespace. The individual strings are then placed in a "list array" called

Re: parsing strings

2001-09-25 Thread Brett W. McCoy
On Tue, 25 Sep 2001 [EMAIL PROTECTED] wrote: > I've been programming for a number of years, but I'm VERY new to Perl, and > it looks like a lot of fun. However, I'm very much in the learning stage, > so please be patient, I'm still learning all the keywords etc... > > I'm curious how I can parse

Re: parsing strings

2001-09-25 Thread GoodleafJ
(Newbie responding) I think: $part2 = substr($part1, 0, 4); That's string, position from which to start, length The parentheses aren't technically necessary; I just like them... -J