perl -MCGI -le 'CGI::ReadParse(); print for split /\0/, $in{myname}' \ 'idx=8&args=&myname=ABCD.txt&idx=+&myname=foobar'