Author Topic: Perl Stripslashes  (Read 1401 times)

dynaweb

  • <b>Canine Deamon</b>
  • Administrator
  • Sr. Member
  • *****
  • Posts: 483
  • Karma: +10/-0
  • Generic personal text here ...
    • MSN Messenger - danno_d_manno@yahoo.com
    • View Profile
    • DynaWeb Designs
    • Email
Perl Stripslashes
« on: January 01, 2007, 03:31:11 PM »
PHP has a handy function stripslashes() to kill backslashes in output.  I am looking for a way to easily strip slashes in perl.
Those who cannot learn from history are doomed to repeat it. -- Linux learns.

ctwjr

  • Super Moderator
  • Jr. Member
  • **
  • Posts: 72
  • Karma: +10/-0
    • View Profile
    • http://www.ftplive.com
    • Email
Perl Stripslashes
« Reply #1 on: January 01, 2007, 05:34:44 PM »
Try this

$string =~ s/\\\\([^\\\\])/$1/g;

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1213 Views
Last post August 04, 2005, 04:36:39 PM
by dynaweb
8 Replies
1941 Views
Last post January 01, 2007, 10:42:46 PM
by zelo
2 Replies
1166 Views
Last post October 02, 2005, 10:30:39 PM
by dynaweb