in reply to CGI Filenames and decode_entities
I'd guess that the decode_entities routine is directly manipulating the @_ array containing the subroutine parameters. If it does that and makes any changes to the string, then it can do what you're describing.
Here's a cheesy example of what I'm talking about:
$ cat destructive_sub.pl use warnings; use strict; my $param = 'Now is the time'; print "$param\n"; do_it($param); print "$param\n"; sub do_it { $_[0] =~ s/([it])/uc($1)/ge; } krevulax:~ [roboticus] $ perl destructive_sub.pl Now is the time Now Is The TIme
Notice how the second print statement gives a slightly different result.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI Filenames and decode_entities
by kennethk (Abbot) on Jul 23, 2015 at 21:54 UTC | |
|
Re^2: CGI Filenames and decode_entities
by Marais (Novice) on Jul 23, 2015 at 21:54 UTC |