Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: splitting contents of a variable ( not what you think!! )

by Masem (Monsignor)
on Jan 28, 2002 at 04:51 UTC ( #142000=note: print w/replies, xml ) Need Help??

in reply to splitting contents of a variable ( not what you think!! )

You're close. You probably want to put all your strings into an array, then use the reverse of split, join to put your '&' into place. Continuing from your code:
my @strings; foreach $keyword (@keywords){ $wordnum++; push @strings, "keyword_$wordnum=$keyword"; } my $string = join '&', @strings;

Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://142000]
and John Coltrane plays...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-06-19 02:11 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.