Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: [Perl-CGI] Print non-interpolated string

by mr_mischief (Monsignor)
on Apr 04, 2014 at 16:18 UTC ( #1081164=note: print w/ replies, xml ) Need Help??


in reply to Re^4: [Perl-CGI] Print non-interpolated string
in thread [Perl-CGI] Print non-interpolated string

CGI has two operating modes: OO and procedural. You have to import the procedural portions to get that syntax.

Also, it's not Perl that's evaluating your code as to Perl it's just text data until you use something like eval $text. Your browser, on the other hand, feels free to interpret HTML as HTML in an HTML document type. Look into both escaping characters (as you have done), and into additional issues like HTML entities in general and <pre></pre> tags. While you're at it, look into SQL injection and XSS.


Comment on Re^5: [Perl-CGI] Print non-interpolated string
Select or Download Code
Re^6: [Perl-CGI] Print non-interpolated string
by Digioso (Novice) on Apr 06, 2014 at 10:10 UTC
    Thanks, my problem came up together with SQL injections basically. Not that I've been hit by that but I noticed the possibility.
    Regarding XSS I think that I'm kinda safe, since I considered that while programming but a having a deeper look won't hurt. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1081164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-09-22 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls