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 you only want the first n-1 items, or when you
want to lump all the items >= n into a single lump:
$piid = (split(/\t/,$row,2)[0];
Most of the time it probably doesn't matter, but adding a limit will
be markedly more efficient if $row is particularly long or you are
looping through an extremely long list of rows.
As always, see perldoc -f split for the details.
HTH,
-- jay
--------------------------------------------------
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org
values of β will give rise to dom!