Re: Treating a split() as an array

2007-03-04 Thread Jay Savage
On 3/3/07, Rob Dixon <[EMAIL PROTECTED]> wrote: Jay Savage wrote: [snip] >> The LIMIT parameter can be used to split a line partially >> >> ($login, $passwd, $remainder) = split(/:/, $_, 3); >> >> When assigning to a list, if LIMIT is omitted, or zero, Perl >>

Re: Treating a split() as an array

2007-03-03 Thread Rob Dixon
Jay Savage wrote: > > On 3/3/07, John W. Krahn <[EMAIL PROTECTED]> wrote: >> >> Jay Savage wrote: >>> >>> On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: I think this is all you do: $piid = (split(/\t/, $row))[0]; >>> >>> Split also takes an optional limit that keeps it from

Re: Treating a split() as an array

2007-03-03 Thread John W. Krahn
Jay Savage wrote: > On 3/3/07, John W. Krahn <[EMAIL PROTECTED]> wrote: >> Jay Savage wrote: >> > On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: >> >> I think this is all you do: >> >> >> >> $piid = (split(/\t/, $row))[0]; >> > >> > Split also takes an optional limit that keeps it from splittin

Re: Treating a split() as an array

2007-03-03 Thread Jay Savage
On 3/3/07, John W. Krahn <[EMAIL PROTECTED]> wrote: Jay Savage wrote: > On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: >> I think this is all you do: >> >> $piid = (split(/\t/, $row))[0]; > > Split also takes an optional limit that keeps it from splitting the > string into more than n parts.

Re: Treating a split() as an array

2007-03-03 Thread John W. Krahn
Jay Savage wrote: > On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: >> I think this is all you do: >> >> $piid = (split(/\t/, $row))[0]; > > Split also takes an optional limit that keeps it from splitting the > string into more than n parts. This keeps spilt from performing > useless operations

Re: Treating a split() as an array

2007-03-03 Thread Jay Savage
On 3/2/07, Robert Boone <[EMAIL PROTECTED]> wrote: I think this is all you do: $piid = (split(/\t/, $row))[0]; *Please don't top post.* Split also takes an optional limit that keeps it from splitting the string into more than n parts. This keeps spilt from performing useless operations when

Re: Treating a split() as an array

2007-03-02 Thread Robert Boone
I think this is all you do: $piid = (split(/\t/, $row))[0]; On Mar 2, 2007, at 3:07 PM, Shawn Milo wrote: Considering the following: @temp = split(/\t/, $row); $piid = $temp[0]; Is it possible to cut this down to one line, similar to the following Python code? piid = row.split('\t')[0] T

Re: Treating a split() as an array

2007-03-02 Thread Jason Roth
$piid = (split(/\t/, $row))[0] On 3/2/07, Shawn Milo <[EMAIL PROTECTED]> wrote: Considering the following: @temp = split(/\t/, $row); $piid = $temp[0]; Is it possible to cut this down to one line, similar to the following Python code? piid = row.split('\t')[0] Thank you, Shawn -- To unsubsc

Treating a split() as an array

2007-03-02 Thread Shawn Milo
Considering the following: @temp = split(/\t/, $row); $piid = $temp[0]; Is it possible to cut this down to one line, similar to the following Python code? piid = row.split('\t')[0] Thank you, Shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]