in reply to CGI Filenames and decode_entities

Why did you write this use CGI qw(:cgi-lib);??

Also why would you call decode_entities on $filename?

I can't imagine a reason you would need to use either of those things, so it kinda doesn't make sense to try to figure out why you're seeing what you're seeing

It could be as simple as depending on what version of CGI.pm, $filename could be a simple string, or an object

Replies are listed 'Best First'.
Re^2: CGI Filenames and decode_entities (why)
by Marais (Novice) on Jul 23, 2015 at 22:56 UTC
    All I can do is plead ignorance, my lord.

    That line to include the CGI library is just a bad habit from when I first began using Perl.

    As for decoding entities in the file name, I did mention at the start "In retrospect, I don't really need to worry about entities in the filename, but I'm very curious as to what is going on here."

    So, I'm just trying to understand, and by no means trying to demonstrate what a virtuoso Perl programmer I am.

      Have you tried dumping the filename before/after with DD()?  sub DD { scalar Data::Dumper->new( \@_ )->Indent(1)->Useqq(1)->Dump; }