in reply to Matching multiple variables against array

I can read neither your code nor your English, but I gather that your question has something to do with processing a CSV file.

Please look at Tie::CSV_File

  • Comment on Re: Matching multiple variables against array

Replies are listed 'Best First'.
Re^2: Matching multiple variables against array
by Anonymous Monk on Mar 01, 2006 at 17:12 UTC
    Thanks for your help

    I am confused by this bit tho and how I can get the different form values into @form

    my @form = map { $cgi->param("form$_") } 0..21;

    When trying to run this at the mo. I get the error message: Can't call method "param" on an undefined value line 31 which is where the above line sits.

    Thanks again
      When trying to run this at the mo. I ...

      What do you mean by "mo."?

      It seems you have been using only the functional interface of (i assume) CGI.pm or equivalent module. Object oriented interface was used in ikegami's reply, where $cgi was some CGI* object. If you just use param( ... ) instead of $cgi->param( ... ), you should get moving along.

      Also, it looks like you are not using warnings & strict pragmas. If you were, you would have seen different error message.

        What do you mean by "mo."?
        Sorry I meant at the moment.

        I am using the below pragmas for warnings.

        #!/usr/bin/perl -wT
        use strict;
        use CGI ':standard';
        use CGI::Carp qw(fatalsToBrowser);


        Have tried using just param( ... ) but I am still not moving :-(

        How can i get the below incoming values into @form ?
        $1 = param('1');
        $2 = param('2');
        $3 = param('3');

        Thanks