Help for this page

Select Code to Download


  1. or download this
    my @files = glob "$ENV{'DOCUMENT_ROOT'}/data/text/*.txt";
    my @display_files = map m{([^/]+)\.txt}, @files;
    ...
    
        ## IF YOU GET HERE, YOU HAVE A VALID MATCH
        ## so you can see where your next coding mistake is...
    
  2. or download this
    perl -MEncode -le '$a="\x{0341}"; $b=encode("utf8",$a); print "a:b ", 
    +(($a eq $b) ? "same":"different")'
    
    ...
    perl -MEncode -le '$a=decode("utf8","foo"); $b=encode("utf8","foo"); p
    +rint "a:b ", (($a eq $b) ? "same":"different")'
    
    # still prints "same