Hi... I have an array of pipe delimited data from a file. I need to go item by item of the array, splitting up the fields into separate variables so that I can insert other pre-determined fields into an SQL statement to load into a MySQL db. I feel pretty confident about the SQL part, but I'm not sure the best way to split the fields of the array. I have 4 pipe-delimited fields in each line of the array.

is it as simple as doing:

foreach $item (@array) {
        my ($key, $title, $url, $code) = split /\|/;
        do other stuff....;
}

--
Tim McGeary
Senior Library Systems Specialist
Lehigh University
610-758-4998
[EMAIL PROTECTED]


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to