Help for this page

Select Code to Download


  1. or download this
    /
    /
    
  2. or download this
    use strict;
    use warnings;
    use HTML::Entities;
    print encode_entities(`cat two-lines-with-one-slash-each.txt`);
    __END__
    
  3. or download this
    $ perl html.entities.pl
    Unmatched [ in regex; marked by <-- HERE in m/([ <-- HERE / at (eval 1
    +) line 2.
    ...
     into code: sub {$_[0] =~ s/([/
    ])/$char2entity{$1} || num_entity($1)/ge; }
      at /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/HTML/Ent
    +ities.pm line 428.
    
  4. or download this
    $ perl -v | head -2
    
    ...
    
    cpan[2]> install HTML::Entities
    HTML::Entities is up to date (1.35).