in reply to Regular Expresion
Another possibility using split's:
use 5.010; use strict; use warnings; while (<DATA>){ chomp; my %ps = map {my @k = split /=/; $k[0] => $k[1]} split /&/,(split /\ +?/)[1]; say "username = $ps{username}; id=$ps{id}" } __DATA__ http://beta.websitename.com/tool/view/mb/file?username=anirudh007&id=4 +3242342 http://beta.websitename.com/tool/view/mb/file?id=3323213&username=anir +udh007
username = anirudh007; id=43242342 username = anirudh007; id=3323213
citromatik
|
|---|