Re: split - maxSplit

2001-05-31 Thread David Olbersen
On Thu, 31 May 2001, Brian Shoemaker wrote: > I've never used the maxSplit parameter in my scripts. By not using the > maxSplit parameter am I slowing things down? As per `perldoc -f split` If LIMIT is specified and positive, splits into no more than that many fields (though it may split into f

Re: split - maxSplit

2001-05-31 Thread Jeff Pinyan
On May 31, Brian Shoemaker said: >($id,$dir,$code,$etc) = split(/\|/,$i); > >However, the Perl 5 book I have lists the syntax of split as. > >lvalue = split(/pattern/,expression,maxSplit); Perl can automatically add that argument if you have a known number of elements on the left-hand side:

split - maxSplit

2001-05-31 Thread Brian Shoemaker
I have numerous files where I do the following Within in a foreach loop I use.. ($id,$dir,$code,$etc) = split(/\|/,$i); However, the Perl 5 book I have lists the syntax of split as. lvalue = split(/pattern/,expression,maxSplit); I've never used the maxSplit parameter in my scripts