Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7647409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:27:14+00:00 2026-05-31T10:27:14+00:00

What I am trying to do is get a collection of all UTF16 Unicode

  • 0

What I am trying to do is get a collection of all UTF16 Unicode charts. I downloaded all pdf files from http://unicode.org/charts/PDF/ and decided to use perl to get rid of all of the special, or UTF32 charts with the following script:

#!/usr/bin/perl

opendir(my $dir, ".");
my @files = grep {!/^U[0-9,A-F]{4}\.pdf/ && !/utf16only.pl/} readdir($dir);
for $f (@files)
{
    print "deleting $f...\n";
    #unlink $f;
}
closedir($dir);

When I run the script, I get the following output:

C:\Users\Evan\Downloads\Unicode 6.1 Charts>utf16only.pl
deleting ....
deleting .....
deleting 10FF80.pdf...
deleting ErrorLink.pdf...
deleting U10000.pdf...
deleting U100000.pdf...
deleting U10080.pdf...
deleting U10100.pdf...
deleting U10140.pdf...
deleting U10190.pdf...
deleting U101D0.pdf...
deleting U10280.pdf...
deleting U102A0.pdf...
deleting U10300.pdf...
deleting U10330.pdf...
deleting U10380.pdf...
deleting U103A0.pdf...
deleting U10400.pdf...
deleting U10450.pdf...
deleting U10480.pdf...
deleting U10800.pdf...
deleting U10840.pdf...
deleting U10900.pdf...
deleting U10920.pdf...
deleting U10980.pdf...
deleting U109A0.pdf...
deleting U10A00.pdf...
deleting U10A60.pdf...
deleting U10B00.pdf...
deleting U10B40.pdf...
deleting U10B60.pdf...
deleting U10C00.pdf...
deleting U10E60.pdf...
deleting U10FF80.pdf...
deleting U11000.pdf...
deleting U11080.pdf...
deleting U110D0.pdf...
deleting U11100.pdf...
deleting U11180.pdf...
deleting U11680.pdf...
deleting U12000.pdf...
deleting U12400.pdf...
deleting U13000.pdf...
deleting U16800.pdf...
deleting U16F00.pdf...
deleting U1B000.pdf...
deleting U1D000.pdf...
deleting U1D100.pdf...
deleting U1D200.pdf...
deleting U1D300.pdf...
deleting U1D360.pdf...
deleting U1D400.pdf...
deleting U1EE00.pdf...
deleting U1F000.pdf...
deleting U1F030.pdf...
deleting U1F0A0.pdf...
deleting U1F100.pdf...
deleting U1F200.pdf...
deleting U1F300.pdf...
deleting U1F600.pdf...
deleting U1F680.pdf...
deleting U1F700.pdf...
deleting U1FF80.pdf...
deleting U20000.pdf...
deleting U2A700.pdf...
deleting U2B740.pdf...
deleting U2F800.pdf...
deleting U2FF80.pdf...
deleting U3FF80.pdf...
deleting U4FF80.pdf...
deleting U5FF80.pdf...
deleting U6FF80.pdf...
deleting U7FF80.pdf...
deleting U8FF80.pdf...
deleting U9FF80.pdf...
deleting UAFF80.pdf...
deleting UBFF80.pdf...
deleting UBOOP.pdf...
deleting UCFF80.pdf...
deleting UDFF80.pdf...
deleting UE0000.pdf...
deleting UE0100.pdf...
deleting UEFF80.pdf...
deleting UF0000.pdf...
deleting UFFF80.pdf...

The first 2 lines still being . and .. And, I think because I am trying to unlink ., it’s removing a large number of files that I did not want to remove. I am not sure whether the problem lies with my regexs, grep, readdir, or unlink, but it’s removing way more files than it should.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:27:15+00:00Added an answer on May 31, 2026 at 10:27 am

    This line:

    grep {!/^U[0-9,A-F]{4}\.pdf/ && !/utf16only.pl/}
    

    Includes only files that match neither regex. That includes . and ... To exclude those two, you’d have to extend that:

    grep {!/^U[0-9,A-F]{4}\.pdf/ && !/utf16only.pl/ && !/^\.{1,2}$/}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm trying to find a way to get a collection of all versions
I am trying to get a TreeView to bind my collection so that all
I am trying to get 4 List deep List collection, List<List<List<List<int>>>> . From my
I'm trying to get a collection of values from an XML document: <root> <string
I'm trying to get NHibernate to use the many side of a collection to
I am trying to get Collection of all available products in Magento & Filter
I'm getting the error Illegal access to loading collection when I'm trying to get
Hi I am trying to get a connection from windows a unix box and
I'm trying get the visible portion of UIImage from an UIImageView . UIImageView takes
I'm trying to get a collection of selections but filtered on the parent product's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.