in reply to Re^2: Save form data with decoded URL chars
in thread Save form data with decoded URL chars

but that means I have to open a file again, run through subroutine, save it to another file and then close and unlink and rename and so on.

No you don't, why do you think you need to do that?

Any better TMTOWTDI is highly appreciated.

Its simple, don't use save, use param

  • Comment on Re^3: Save form data with decoded URL chars

Replies are listed 'Best First'.
Re^4: Save form data with decoded URL chars
by SerZKO (Beadle) on Aug 08, 2012 at 13:26 UTC
    Any chance you could post a little snippet to point me to right direction ?

      Any chance you could post a little snippet to point me to right direction ?

      No, the CGI documentation is full of snippets, and the distribution comes with samples

      perl -MCGI -e " $q= CGI->new({ ro => qq{=sh\nam=bo\n}, }); print qq{\ +n\n\n# first save()d and new()able\n}; $q->save( \*STDOUT ); print qq +{# and now not save()d and not new()able\n}; for my $key( $q->param ) +{ for my $val( $q->param($key) ){ print qq{$key=$val\n}; } } " # first save()d and new()able ro=%3Dsh%0Aam%3Dbo%0A = # and now not save()d and not new()able ro==sh am=bo
        Man, sorry but I just don't get it... :-(

        I took a look at examples as well, and there is an example script there using save method as well...