Results 1 to 2 of 2

Thread: Perl $_POST

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Oct:2008
    Location:
    Posts: 95

    Unhappy Perl $_POST

    ,

    $_POST , ( ) , - , .. . PHP :
    PHP Code:
    foreach ($_POST as $key => $value) {
    $_POST[$key] = preg_replace("/\"/""""$_POST[$key]);
    $_POST[$key] = preg_replace("/\//""/"$_POST[$key]);
    if (!
    get_magic_quotes_gpc()) $_POST[$key] = preg_replace('@\\\@'"\", $_POST[$key]);
    else {
    $_POST[$key] = stripslashes($_POST[$key]);
    $_POST[$key] = preg_replace('@\\\@', "\", $_POST[$key]);

    ...
    Perl :
    PHP Code:
    use CGI;
    use 
    CGI::Carp qw(fatalsToBrowser);
    my $cgi = new CGI;
    my @parameters $cgi->param;
    my $n 0;
    while (
    $parameters[$n]) {
        
    $cgi->param("$parameters[$n]") =~ s/-/++/g;
        print 
    $cgi->param("$parameters[$n]");
        
    $n++;

    Can't modify non-lvalue subroutine call at...
    !

  2. #2
    Registered User
    Join Date: Oct:2008
    Location:
    Posts: 95

    Perl POST GET

    Perl . , :
    my %form = $cgi->Vars;
    while ((my $key, my $value) = each(%form)){
    $form{$key} =~ s/\\/\/g;
    $form{$key} =~ s/\////g;
    $form{$key} =~ s/\"/"/g;
    $form{$key} =~ s/\'|\`//g;
    }
    #my $text = $form{'____'};

    !!! hash . %form, -.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |