in reply to Can someone help me to explain the code below

(($this_mail) = ($this_in =~ /(.*)/gio));

That simply matches everything in $this_in and assigns it to $this_mail. More concisely:

$this_mail = $this_in;

Replies are listed 'Best First'.
Re^2: Can someone help me to explain the code below
by Fletch (Bishop) on Aug 03, 2010 at 20:54 UTC

    When running under -T it will also make an untainted copy of the contents of $this_in in $this_mail (presuming $this_in was from a tainted source)</nit>

    $ perl -MScalar::Util=tainted -lT -e '($o)=$ENV{PWD}=~/(.*)/gio;print +tainted( $_ ) for ( $o, $ENV{PWD} )' 0 1

    (Not that that's the case here, but saying it's just a copy assignment isn't universally true . . .)

    Update: And before someone else outpedants me, as toolic points out above that should really be "... an untainted copy up to the first newline of the contents ..." :)

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Well, true, but <nit>
      We're untainting only to the extent that we're performing a function that Perl (uncritically) reads as untainting... but without any substantive untainting...

      In other words, <c>(($this_mail) = ($this_in =~ /(.*)/gio));<c> passes the entire tainted input without any attempt to cull out unacceptable content.

      </nit> (or is it merely a nit?)
Re^2: Can someone help me to explain the code below
by toolic (Bishop) on Aug 03, 2010 at 20:08 UTC
    . does not match then newline character. So it's more like:
    $this_mail = $this_in; chomp $this_mail;
    A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.