#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Shuffle all parameters behind &


    Hello i was wondering if anyone know how to shuffle an url with perl, but then only all parameters after the &

    heres an example:
    anyurl
    =i&ct=1&cad=1&rsm=6&ei=JthyULClH8fH0QWcooD4Bw&zx=1349703728841


    so i want all parameters behind the & on a different place every print, is this possible??

    thnx in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    71
    Rep Power
    2
    You gave us an example of the before. Could you give us an example of after the shuffle?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    shuffle


    yes sorry

    heres an example after
    anyurl
    ei=JthyULClH8fH0QWcooD4Bw&cad=1=i&ct=1&rsm=6&&zx=1349703728841

    just so that all parameters behind the & are placed on a different place.


    Originally Posted by G4143
    You gave us an example of the before. Could you give us an example of after the shuffle?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,930
    Rep Power
    1225
    We need more details and context in what you're needing to accomplish.

    Based on the almost non existent info, the solution would be to have your params in an array and use either the List::Util or Array::Shuffle module to shuffle the array and then join the elements to rebuild the url.

IMN logo majestic logo threadwatch logo seochat tools logo