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
> -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
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
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
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
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
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
--- 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