Re: error msg : can't use string as an ARRAY ref

2004-02-23 Thread R. Joseph Newton
Ron Goral wrote: > Here you are treating @all_of_them as a multi-dimensional array, and this is > where the error occurs. Solve this by - > > a) Splitting the array element here < $all_of_them[$ctr] eq $temp1) ; >> > b) Splitting $_ when you push the data into @all_of_them << push > (@all_of_them

RE: error msg : can't use string as an ARRAY ref

2004-02-23 Thread Ron Goral
> -Original Message- > From: Joseph Paish [mailto:[EMAIL PROTECTED] > Sent: Monday, February 23, 2004 9:18 AM > To: perl_beginner > Subject: error msg : can't use string as an ARRAY ref > while () { > push (@all_of_them, $_ ) ; # an array of all the records in the file Since you ar

Re: error msg : can't use string as an ARRAY ref

2004-02-23 Thread Joseph Paish
i stripped out a fair chunk of code, including variable declarations to save space. i thought it would be better that way, if i just put in something like "variable declarations went here" instead of listing them all. that way, only the "core" code would be shown without cluttering it up with

Re: error msg : can't use string as an ARRAY ref

2004-02-23 Thread WC -Sx- Jones
Joseph Paish wrote: < code snipped > :) Please use perl -c program to test program before posting. syntax error at t line 12, near ") {" Global symbol "@all_of_them" requires explicit package name at PROG line 13. Global symbol "@temp_array" requires explicit package name at PROG line 15. syn

Re: error msg : can't use string as an ARRAY ref

2004-02-23 Thread WC -Sx- Jones
Randy W. Sims wrote: On 02/23/04 10:38, Joseph Paish wrote: for ($ctr = 0 ; $ctr < (scalar(@all_of_them)) ; $ctr++) { You don't need to say 'scalar' as it will be evaluated in the correct context without it. $#all_of_them -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

RE: error msg : can't use string as an ARRAY ref

2004-02-23 Thread Charles K. Clarkson
Joseph Paish <[EMAIL PROTECTED]> wrote: [snip] : # everything works well up to here : : # what i want to do is loop through the sorted unique part : numbers array and print out all the array elements in : @all_of_them that have a part number that matches that : unique value. i then m

Re: error msg : can't use string as an ARRAY ref

2004-02-23 Thread Randy W. Sims
On 02/23/04 10:38, Joseph Paish wrote: --- several lines stripped out --- # everything works well up to here # what i want to do is loop through the sorted unique part numbers array and print out all the array elements in @all_of_them that have a part number that matches that unique valu

Re: error msg : can't use string as an ARRAY ref

2004-02-23 Thread Joseph Paish
--- several lines stripped out --- > > # everything works well up to here > > # what i want to do is loop through the sorted unique part numbers array > and print out all the array elements in @all_of_them that have a part > number that matches that unique value. i then move onto the next