"Purcell, Scott" wrote:
> I am trying to use the 'escape' function in CGI pm, and have Steins book,
> but the example shows the OO way ot using it.
> eg.
> $escaped = CGI->escape("some line with spaces");
>
> But I do not use the module in the OO fashion,
> How do I do this procedurally?
>
> could some help me with this?
That code will still work when using the procedural interface to
CGI.pm. I tested the following code on my box (Mandrake 7.1/Perl
5.6.0/CGI-2.74):
: #/usr/bin/perl -w
: use CGI qw(:standard);
: print CGI->escape('C++'); # works; displays: "C%2B%2B"
: # as well as
: print CGI::escape('C++'); # same
If you want to use escape() without explicitly stating the CGI package,
you have to import it thus:
: use CGI qw(:standard escape);
: print escape('C++');
All this info (and soooooo much more) available here:
perldoc CGI
HTH
--
-Tim Hammerquist <[EMAIL PROTECTED]>
The surest sign that intelligent life exists elsewhere in
the universe is that it has never tried to contact us.
-- Bill Watterson (Calvin & Hobbes)
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web