the string function quote??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OmbongiMoraa
    New Member
    • Feb 2012
    • 2

    the string function quote??

    Hi,

    I'm learing perl and I've just come up with the following statement from a some script:
    $content = $dbh->quote($content);

    I've read through Blair Ireland's tutorial on perl MySQL functions for the meaning of this quote string function but I'm still not getting it.


    Would someone please explain to me in simple language, exactly what the quote() does??
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    It takes a string, puts single quotes around it, and escapes all special characters in the string.

    Comment

    • chorny
      Recognized Expert New Member
      • Jan 2008
      • 80

      #3
      Look also into DBI documentation: http://search.cpan.org/~timb/DBI-1.617/DBI.pm#quote

      Comment

      Working...