Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527

    Unanswered: Passing array via form

    How can I enter and read an array in Perl via an HTML form. I can do it in PHP but I was wanting to use Perl for this app. Any ideas, quick example or a link that might help?

    Cheers

    Mike

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Quote Originally Posted by mike_bike_kite
    How can I enter and read an array in Perl via an HTML form. I can do it in PHP but I was wanting to use Perl for this app. Any ideas, quick example or a link that might help?

    Cheers

    Mike
    Sorry I didn't spot this earlier. If it's still worth answering, I just need to know some more specifics. Are you writing a CGI or mod_perl or doing something else?

    Generally, if you have some text and want an array:

    Code:
    @array = split(/sep/, $text);
    /sep/ is a regular expression, but ' ' will happily split on whitespace. For more info on what's going on:

    perldoc -f split

    perldoc perlre

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •